mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Enforce Rails-style (line-count-based) block style
This commit is contained in:
@@ -400,25 +400,25 @@ module ActionController
|
||||
end
|
||||
|
||||
def test_warn_overridding_use_adapter_as_falsy_on_controller_instance
|
||||
controller = Class.new(ImplicitSerializationTestController) {
|
||||
controller = Class.new(ImplicitSerializationTestController) do
|
||||
def use_adapter?
|
||||
false
|
||||
end
|
||||
}.new
|
||||
assert_match(/adapter: false/, (capture(:stderr) {
|
||||
end.new
|
||||
assert_match(/adapter: false/, (capture(:stderr) do
|
||||
controller.get_serializer(Profile.new)
|
||||
}))
|
||||
end))
|
||||
end
|
||||
|
||||
def test_dont_warn_overridding_use_adapter_as_truthy_on_controller_instance
|
||||
controller = Class.new(ImplicitSerializationTestController) {
|
||||
controller = Class.new(ImplicitSerializationTestController) do
|
||||
def use_adapter?
|
||||
true
|
||||
end
|
||||
}.new
|
||||
assert_equal '', (capture(:stderr) {
|
||||
end.new
|
||||
assert_equal '', (capture(:stderr) do
|
||||
controller.get_serializer(Profile.new)
|
||||
})
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user