You need to set the header that generates the user agent Jon Rowe --------------------------- [email protected] jonrowe.co.uk
On Friday, 12 December 2014 at 23:38, Ester Ytterbrink wrote: > 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 > > > -- > You received this message because you are subscribed to the Google Groups > "rspec" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > (mailto:[email protected]). > To post to this group, send email to [email protected] > (mailto:[email protected]). > To view this discussion on the web visit > https://groups.google.com/d/msgid/rspec/436e2bfa-858f-40a6-98f3-9733ffab650e%40googlegroups.com > > (https://groups.google.com/d/msgid/rspec/436e2bfa-858f-40a6-98f3-9733ffab650e%40googlegroups.com?utm_medium=email&utm_source=footer). > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "rspec" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/5174DEFEC5BF4701B14AF85CD1B69D4F%40jonrowe.co.uk. For more options, visit https://groups.google.com/d/optout.
