Topic: cucumber login
I am using cucumber for my TDD
and i need to make sure that someone that is log in can see some pages and i just added validation to redirect the user if they are not log in
my code looks like
Then /^the user should see "(.*?)"$/ do |text|
if page.respond_to? :should
page.should have_content(text)
else
assert page.has_content?(text)
end
end
Given /^that I am a user$/ do
pending # How do i tell cucumber to log in a user
end
Given /^I visit Profile$/ do
visit profile_path
end