Skip to content

Make cucumber tests pass #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 19, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions features/step_definitions/user_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def create_user
create_visitor
delete_user
@user = FactoryGirl.create(:user, email: @visitor[:email])
@user.add_role("")
end

def delete_user
Expand Down Expand Up @@ -47,7 +48,7 @@ def sign_in

### GIVEN ###
Given /^I am not logged in$/ do
visit '/users/sign_out'
visit destroy_user_session_path
end

Given /^I am logged in$/ do
Expand Down Expand Up @@ -128,10 +129,6 @@ def sign_in
click_button "Update"
end

When /^I look at the list of users$/ do
visit '/'
end

### THEN ###
Then /^I should be signed in$/ do
page.should have_content "Logout"
Expand All @@ -140,7 +137,6 @@ def sign_in
end

Then /^I should be signed out$/ do
page.should have_content "Sign up"
page.should have_content "Login"
page.should_not have_content "Logout"
end
Expand All @@ -158,19 +154,19 @@ def sign_in
end

Then /^I should see an invalid email message$/ do
page.should have_content "Email is invalid"
page.should have_content "is invalid"
end

Then /^I should see a missing password message$/ do
page.should have_content "Password can't be blank"
page.should have_content "can't be blank"
end

Then /^I should see a missing password confirmation message$/ do
page.should have_content "Password doesn't match confirmation"
page.should have_content "doesn't match confirmation"
end

Then /^I should see a mismatched password message$/ do
page.should have_content "Password doesn't match confirmation"
page.should have_content "doesn't match confirmation"
end

Then /^I should see a signed out message$/ do
Expand Down
9 changes: 0 additions & 9 deletions features/users/user_show.feature

This file was deleted.