Refactor cucumber steps definitions

This commit is contained in:
Thibault Jouan
2011-08-30 17:08:49 +00:00
parent a0bb9c2afe
commit 47b4f7ac83
2 changed files with 4 additions and 7 deletions

View File

@@ -3,11 +3,8 @@ Given /^I am not signed in$/ do
end
Given /^I am signed in$/ do
user = Factory.create(:user)
visit new_session_path
fill_in('Email', :with => user.email)
fill_in('Password', :with => user.password)
click_button('Sign in')
When "I submit valid credentials"
end
Then /^I should be redirected to the sign in page$/ do