mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
do not generate id method (was for 1.8 only)
see https://github.com/rails-api/active_model_serializers/issues/127 for original motivation
This commit is contained in:
@@ -36,18 +36,6 @@ class SerializerGeneratorTest < Rails::Generators::TestCase
|
||||
Object.send :remove_const, :ApplicationSerializer
|
||||
end
|
||||
|
||||
def test_serializer_gets_id
|
||||
run_generator
|
||||
|
||||
assert_file "app/serializers/account_serializer.rb" do |content|
|
||||
if RUBY_VERSION =~ /1.8/
|
||||
assert_match /def id/, content
|
||||
else
|
||||
assert_no_match /def id/, content
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# def test_uses_namespace_application_serializer_if_one_exists
|
||||
# Object.const_set(:SerializerNamespace, Module.new)
|
||||
# SerializerNamespace.const_set(:ApplicationSerializer, Class.new)
|
||||
|
||||
Reference in New Issue
Block a user