Rubocop: Consistent spacing

This commit is contained in:
Benjamin Fleischer
2015-08-31 04:22:59 -05:00
parent bdfe13c527
commit 228cc1c92a
47 changed files with 278 additions and 339 deletions

View File

@@ -10,19 +10,19 @@ module ActiveModel
def test_attributes_definition
assert_equal([:id, :title],
@blog_serializer.class._attributes)
@blog_serializer.class._attributes)
end
def test_json_serializable_hash
adapter = ActiveModel::Serializer::Adapter::Json.new(@blog_serializer)
assert_equal({blog: { id:1, title:'AMS Hints'}}, adapter.serializable_hash)
assert_equal({ blog: { id: 1, title: 'AMS Hints' } }, adapter.serializable_hash)
end
def test_attribute_inheritance_with_key
inherited_klass = Class.new(AlternateBlogSerializer)
blog_serializer = inherited_klass.new(@blog)
adapter = ActiveModel::Serializer::Adapter::FlattenJson.new(blog_serializer)
assert_equal({:id=>1, :title=>'AMS Hints'}, adapter.serializable_hash)
assert_equal({ :id => 1, :title => 'AMS Hints' }, adapter.serializable_hash)
end
def test_multiple_calls_with_the_same_attribute
@@ -52,7 +52,7 @@ module ActiveModel
end
adapter = ActiveModel::Serializer::Adapter::Json.new(attribute_serializer.new(@blog))
assert_equal({ blog: { type: 1} }, adapter.serializable_hash)
assert_equal({ blog: { type: 1 } }, adapter.serializable_hash)
adapter = ActiveModel::Serializer::Adapter::Json.new(attributes_serializer.new(@blog))
assert_equal({ blog: { type: 'stuff' } }, adapter.serializable_hash)