mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Style/StringLiterals single quote all the things
This commit is contained in:
@@ -6,7 +6,7 @@ module ActiveModel
|
||||
def setup
|
||||
@profile = Profile.new({ name: 'Name 1', description: 'Description 1', comments: 'Comments 1' })
|
||||
@profile_serializer = ProfileSerializer.new(@profile)
|
||||
@comment = Comment.new(id: 1, body: "ZOMG!!", date: "2015")
|
||||
@comment = Comment.new(id: 1, body: 'ZOMG!!', date: '2015')
|
||||
@serializer_klass = Class.new(CommentSerializer)
|
||||
@serializer_klass_with_new_attributes = Class.new(CommentSerializer) do
|
||||
attributes :date, :likes
|
||||
@@ -35,7 +35,7 @@ module ActiveModel
|
||||
|
||||
def test_attributes_inheritance
|
||||
serializer = @serializer_klass.new(@comment)
|
||||
assert_equal({id: 1, body: "ZOMG!!"},
|
||||
assert_equal({id: 1, body: 'ZOMG!!'},
|
||||
serializer.attributes)
|
||||
end
|
||||
|
||||
@@ -46,7 +46,7 @@ module ActiveModel
|
||||
|
||||
def test_attribute_inheritance_with_new_attribute
|
||||
serializer = @serializer_klass_with_new_attributes.new(@comment)
|
||||
assert_equal({id: 1, body: "ZOMG!!", date: "2015", likes: nil},
|
||||
assert_equal({id: 1, body: 'ZOMG!!', date: '2015', likes: nil},
|
||||
serializer.attributes)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user