mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
add ActiveSupport.on_load announcement
This commit is contained in:
parent
33d4842dcd
commit
4c17a22207
@ -57,3 +57,5 @@ begin
|
||||
rescue LoadError => ex
|
||||
# rails on installed, continuing
|
||||
end
|
||||
|
||||
ActiveSupport.run_load_hooks(:active_model_serializers, ActiveModel::Serializer)
|
||||
|
||||
@ -814,4 +814,12 @@ class SerializerTest < ActiveModel::TestCase
|
||||
]
|
||||
}, actual)
|
||||
end
|
||||
|
||||
def test_active_support_on_load_hooks_fired
|
||||
loaded = nil
|
||||
ActiveSupport.on_load(:active_model_serializers) do
|
||||
loaded = self
|
||||
end
|
||||
assert_equal ActiveModel::Serializer, loaded
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user