You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Devise
I have before_filter on application_controller level to authenticate.
Now I'm writing simple integration test with cucumber/webrat and I
want to assert the redirect to login page unless the user is signed
in. The following test fails and it seems that cucumber/webrat isn't
redirected to sign_in page. Am I not grasping something?
Given /^the user has not logged in$/ do
visit destroy_user_session_path
end
When /^user visits item listing page$/ do
visit items_path
end
Then /^user should end up in page (.+)$/ do |page_name|
current_path = URI.parse(current_url).path
if current_path.respond_to? :should
current_path.should == path_to(page_name)
else
assert_equal path_to(page_name), current_path
end
end