mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Move caching initialization to Railtie
Also - Add reference to config from ActiveModelSerializers.config - correctly call super in FragmentCacheTest#setup - rename test rails app from Foo to ActiveModelSerializers::RailsApplication
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
class Foo < Rails::Application
|
||||
class ActiveModelSerializers::RailsApplication < Rails::Application
|
||||
if Rails::VERSION::MAJOR >= 4
|
||||
config.eager_load = false
|
||||
|
||||
config.secret_key_base = 'abc123'
|
||||
config.action_controller.perform_caching = true
|
||||
|
||||
config.active_support.test_order = :random
|
||||
|
||||
config.logger = Logger.new(nil)
|
||||
|
||||
config.action_controller.perform_caching = true
|
||||
ActionController::Base.cache_store = :memory_store
|
||||
end
|
||||
end
|
||||
Foo.initialize!
|
||||
ActiveModelSerializers::RailsApplication.initialize!
|
||||
|
||||
module TestHelper
|
||||
Routes = ActionDispatch::Routing::RouteSet.new
|
||||
|
||||
Reference in New Issue
Block a user