redirect_to is failing for me in my cucumber tests. The step_definition method is
Then /^I should be redirected to "(.*)"$/ do |url|
response.should redirect_to(url)
end
In Rails 2.3.3 I'm doing:
redirect_to some_url, :status => 301 and return false
I'm running that from the application_controller.rb and returning false. When I tail the test.log I see it redirect yet the cucumber test still fails with a
expected redirect_to ..., got no redirect
The cucumber code looks like:
Given I go to "/blogs?page=1"
Then I should be redirected to "/blogs"
Any idea what I'm missing?