Created
February 13, 2015 14:53
-
-
Save jvanbaarsen/414f4dd57e15f3624bb1 to your computer and use it in GitHub Desktop.
Failing spinach step
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require Rails.root.join('spec', 'support', 'login_helpers') | |
module SharedAuthentication | |
include Spinach::DSL | |
include LoginHelpers | |
step 'I sign in as a user' do | |
login_as :user | |
end | |
step 'I sign in as an admin' do | |
login_as :admin | |
end | |
step 'I sign in as "John Doe"' do | |
login_with(user_exists("John Doe")) | |
end | |
step 'I sign in as "Mary Jane"' do | |
login_with(user_exists("Mary Jane")) | |
end | |
step 'I should be redirected to sign in page' do | |
current_path.should == new_user_session_path | |
end | |
step "I logout" do | |
logout | |
end | |
def current_user | |
@user || User.first | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario: I change my password | |
✔ Given I sign in as a user # features/steps/shared/authentication.rb:7 | |
✔ Given I visit profile password page # features/steps/shared/paths.rb:102 | |
✔ Then I change my password # features/steps/profile/profile.rb:68 | |
✘ And I should be redirected to sign in page # features/steps/shared/authentication.rb:23 | |
expected: "/users/sign_in" | |
got: "/profile/password/edit" (using ==) | |
/Users/jeroen/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/rspec-expectations-3.2.0/lib/rspec/expectations/fail_with.rb:29:in `fail_with' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment