Fixed failing integration tests by using MemoryStore instead of CookieStore for tests. See http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/5519ca7fd4dde3c1. Wohooo passing tests!

This commit is contained in:
Eric Allen 2009-01-26 12:36:12 -05:00
parent 07426ebe54
commit b97fc2d958

View file

@ -19,6 +19,20 @@ config.action_mailer.delivery_method = :test
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false
# We store more than 4K of data in the session during some tests.
# Override the hard-coded cookie session store to use a memory store for tests.
# See http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/5519ca7fd4dde3c1
class ActionController::RackRequest
DEFAULT_SESSION_OPTIONS = {
:database_manager => CGI::Session::MemoryStore, # store data in memory
:prefix => "ruby_sess.", # prefix session file names
:session_path => "/", # available to all paths in app
:session_key => "_session_id",
:cookie_only => false,
:session_http_only=> true
}
end
# Overwrite the default settings for fixtures in tests. See Fixtures
# for more details about these settings.
# config.transactional_fixtures = true