Forum: Ruby on Rails testing with specific request env

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jean H. (Guest)
on 2007-01-20 12:16
(Received via mailing list)
Hi,

I can't seem to be able to add specific headers to a
ActionController::TestRequest. The controller never sees them.

I have recreated the problem in the most simple form I could

line 28 should pass right ?
http://pastie.caboo.se/34430

this works fine using the normal CGIRequest object ... :/ but makes it
hard to test controllers whose actions depend on headers which are not
used by rails (such as HTTP_ACCEPT_LANGUAGE)

have I missed something ?

thx
jean

I join a tgz with a complete and fresh rails 1.2.1 and all the
necessary files to run rake test and see it fail.
This topic is locked and can not be replied to.