Cool.
Be aware that you're by-passing webrat by using the post method -
that's one of the 'raw' rails calls that webrat wraps up in its
elegant set of methods.
It may be that you can pass this same hash to clicks_button but I
don't know - you'd have to check the webrat source.
On 30 Sep
Thanks Matt.
I have check the rails api and see that I can pass a hash with the
headers as a parameter with the post command.
post "/session",
{:username => 'matt', :password => 'secret'},
{:HTTP_USER_AGENT => "MSIE"}
and this works for me, by now, I don't know if I will have
I'm sure it's possible, but sorry I don't know how offhand. I'll tell
you what I know and see if it's enough to help you figure it out for
yourself.
The code you write in cucumber steps (which calls webrat) runs inside
the context of a rails ActionController::Integration::Session. Have a
I have this statement in the layout of my application (using haml)
- if request.env["HTTP_USER_AGENT"].include?("MSIE")
= stylesheet_link_tag 'blueprint/ie.css'
= stylesheet_link_tag 'confirm_ie.css'
The problem is that request.env["HTTP_USER_AGENT"] is nil when I go to
some page in the feature