Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. require 'rails_helper'
  2.  
  3. feature "user admin page" do
  4. scenerio "abc..." do
  5. user = create(:user)
  6. login_with(user.email)
  7. ..
  8. ..
  9. end
  10. end
  11.  
  12. RSpec.configure do |config|
  13. config.include Features::SessionHelpers, type: feature
  14. end
  15.  
  16. module Features
  17. module SessionHelpers
  18. def login_with(email, password = "Password123")
  19. visit session_login_path
  20. fill_in "login_form[email]", with: email
  21. fill_in "login_form[password]", with: password
  22. click_button "Sign In"
  23. end
  24. end
  25. end
  26.  
  27. NoMethodError:
  28. undefined method `login_with' for #<RSpec::Examp...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement