We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0201f2d commit 506739dCopy full SHA for 506739d
test/adapter_test.rb
@@ -38,6 +38,15 @@ def test_create_adapter_with_override
38
adapter = ActiveModel::Serializer::Adapter.create(@serializer, { adapter: :json_api})
39
assert_equal ActiveModel::Serializer::Adapter::JsonApi, adapter.class
40
end
41
+
42
+ def test_inflected_adapter_class_for_known_adapter
43
+ ActiveSupport::Inflector.inflections(:en){|inflect| inflect.acronym 'API' }
44
+ klass = ActiveModel::Serializer::Adapter.adapter_class(:json_api)
45
46
+ ActiveSupport::Inflector.inflections.acronyms.clear
47
48
+ assert_equal ActiveModel::Serializer::Adapter::JsonApi, klass
49
+ end
50
51
52
0 commit comments