Hi!
I have an old feature spec (it lives in the feature folder) in the project where I work right now
it 'can visit each foo' do
@foos.each do |foo|
visit foo_path(foo)
[302, 200].include?(page.status_code).should be_truthy
end
end
Except for not using expect and being a non optimal test it broke totally when the page rendered by foo_path started to use a helper that checks request.user_agent (since it obviously do not exist in that context)
How do I solve that?
Should the test live somewhere else? Use something else than visit?
Thank you beforehand!
Ester Ytterbrink