I have a very simple functional test for a controller, but I need to
set a header field in the request before the invocation of the action,
but the headers seem to be getting reset, even though I'm not doing
multiple requests. Is this not how functional tests are to be used?
test "test the show requires system header" do
@request.headers["System-Name"] = "Test System"
get :show
assert_response :success
...
end
The controller doesn't return a success unless the header is set, so
it fails immediately.
Is there another idiom that's more appropriate?
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.