aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/activerecord/active_record_store_test.rb8
-rw-r--r--actionpack/test/dispatch/session/cookie_store_test.rb2
-rw-r--r--actionpack/test/dispatch/session/mem_cache_store_test.rb7
3 files changed, 14 insertions, 3 deletions
diff --git a/actionpack/test/activerecord/active_record_store_test.rb b/actionpack/test/activerecord/active_record_store_test.rb
index 61bee1b66c..6d4b8e1e40 100644
--- a/actionpack/test/activerecord/active_record_store_test.rb
+++ b/actionpack/test/activerecord/active_record_store_test.rb
@@ -152,12 +152,18 @@ class ActiveRecordStoreTest < ActionController::IntegrationTest
end
private
+
def with_test_route_set(options = {})
with_routing do |set|
set.draw do |map|
match ':action', :to => 'active_record_store_test/test'
end
- @app = ActiveRecord::SessionStore.new(set, options.reverse_merge(:key => '_session_id'))
+
+ @app = self.class.build_app(set) do |middleware|
+ middleware.use ActiveRecord::SessionStore, options.reverse_merge(:key => '_session_id')
+ middleware.delete "ActionDispatch::ShowExceptions"
+ end
+
yield
end
end
diff --git a/actionpack/test/dispatch/session/cookie_store_test.rb b/actionpack/test/dispatch/session/cookie_store_test.rb
index a6cdbf8032..21d11ff31c 100644
--- a/actionpack/test/dispatch/session/cookie_store_test.rb
+++ b/actionpack/test/dispatch/session/cookie_store_test.rb
@@ -199,7 +199,7 @@ class CookieStoreTest < ActionController::IntegrationTest
match ':action', :to => ::CookieStoreTest::TestController
end
- options = { :key => SessionKey, :secret => SessionSecret }.merge!(options)
+ options = { :key => SessionKey }.merge!(options)
@app = self.class.build_app(set) do |middleware|
middleware.use ActionDispatch::Session::CookieStore, options
diff --git a/actionpack/test/dispatch/session/mem_cache_store_test.rb b/actionpack/test/dispatch/session/mem_cache_store_test.rb
index 5a1dcb4dab..8858a398e0 100644
--- a/actionpack/test/dispatch/session/mem_cache_store_test.rb
+++ b/actionpack/test/dispatch/session/mem_cache_store_test.rb
@@ -114,7 +114,12 @@ class MemCacheStoreTest < ActionController::IntegrationTest
set.draw do |map|
match ':action', :to => ::MemCacheStoreTest::TestController
end
- @app = ActionDispatch::Session::MemCacheStore.new(set, :key => '_session_id')
+
+ @app = self.class.build_app(set) do |middleware|
+ middleware.use ActionDispatch::Session::MemCacheStore, :key => '_session_id'
+ middleware.delete "ActionDispatch::ShowExceptions"
+ end
+
yield
end
end