I have a simple Rails 3 app: no models, one view and one controller with a single index method which produces static content. It works fine: when I manually browse to '/' I see my static content.
Then I added an integration test:
# myproj/test/integration/routes_test.rb
class RoutesTest < ActionController::IntegrationTest
test 'default_route' do
get '/'
assert_response :success, @response.body
end
end
When running this test via rake, it tells me that GET '/' is responding with 500. Examination of the log output reveals this message in the response body:
A secret is required to generate an integrity hash for cookie session data. Use config.secret_token = "some secret phrase of at least 30 characters" in config/initializers/secret_token.rb
Of course secret_token.rb exists and contains a properly formatted secret (it was generated by Rails 3 itself.)
Anyone out there know how to enable integration testing in Rails 3? I'm guessing perhaps I need to set some other configuration options to tell my app to accept integration tests.