Hello,
I have this step-definitions file:
Given /^a user "(.*?)" exists$/ do |user_name|
@user = User.create!(:username => user_name , :password => "tamara")
end
When /^he logs in$/ do
visit("/login")
fill_in('Username', :with => "roelof")
fill_in('Password', :with => "tamara")
click_button("Login")
end
Then /^he should see "(.*?)"$/ do |message|
page.should have_content(message)
end
When /^he logs in with a bad password$/ do
visit("/login")
fill_in('Username', :with => "roelof")
fill_in('Password', :with => "roelof")
click_button("Login")
end
Then /^he should not see "(.*?)"$/ do |message|
page.should_not have_content(message)
end
eveything is green here.
But now I wonder how I can test this using Rspec and have a good rspec file.
Who can give me some tips ?
Roelof
--
You received this message because you are subscribed to the Google Groups
"rspec" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msg/rspec/-/QaZjSc2gjPAJ.
For more options, visit https://groups.google.com/groups/opt_out.