I tried to add this feature with a patch largely based in another
Aslak's gist which adds the set_headers feature for cucumber
https://gist.github.com/717819
(I don't like the 'page.set_headers' syntax in the test because
conceptually we're altering the request headers which have nothing to
do with the page, but you can see the point) :)
Aslak's approach dynamically alters the current driver and I'm
directly extending RackTest so the env manipulation may potentially
break some RackTest functionalities, please drop me a line in that
case so we can hack something better ;)
Have a nice weekend!
--
Raul Murciano
Freelance Web Developer - http://raul.murciano.net
Ruby/Rails Trainer & Consultant - http://prorubyteam.com