diff --git a/activemodel/Rakefile b/activemodel/Rakefile index d94f857614..d62c7b46c8 100644 --- a/activemodel/Rakefile +++ b/activemodel/Rakefile @@ -2,7 +2,7 @@ require "rake/testtask" dir = File.dirname(__FILE__) -task :default => :test +task default: :test task :package diff --git a/activemodel/test/cases/attribute_methods_test.rb b/activemodel/test/cases/attribute_methods_test.rb index 89166f2f1e..676459cc8e 100644 --- a/activemodel/test/cases/attribute_methods_test.rb +++ b/activemodel/test/cases/attribute_methods_test.rb @@ -48,7 +48,7 @@ class ModelWithAttributesWithSpaces include ActiveModel::AttributeMethods def attributes - { :'foo bar' => "value of foo bar"} + { 'foo bar': "value of foo bar"} end private @@ -67,7 +67,7 @@ class << self end def attributes - { :'a?b' => "value of a?b" } + { 'a?b': "value of a?b" } end private diff --git a/activemodel/test/cases/translation_test.rb b/activemodel/test/cases/translation_test.rb index 95655e03b4..69a3acd957 100644 --- a/activemodel/test/cases/translation_test.rb +++ b/activemodel/test/cases/translation_test.rb @@ -56,7 +56,7 @@ def test_translated_model_attributes_with_ancestors_fallback def test_translated_model_attributes_with_attribute_matching_namespaced_model_name I18n.backend.store_translations "en", activemodel: { attributes: { person: { gender: "person gender"}, - :"person/gender" => { attribute: "person gender attribute" } + "person/gender": { attribute: "person gender attribute" } } } assert_equal "person gender", Person.human_attribute_name("gender") @@ -64,12 +64,12 @@ def test_translated_model_attributes_with_attribute_matching_namespaced_model_na end def test_translated_deeply_nested_model_attributes - I18n.backend.store_translations "en", activemodel: { attributes: { :"person/contacts/addresses" => { street: "Deeply Nested Address Street" } } } + I18n.backend.store_translations "en", activemodel: { attributes: { "person/contacts/addresses": { street: "Deeply Nested Address Street" } } } assert_equal "Deeply Nested Address Street", Person.human_attribute_name("contacts.addresses.street") end def test_translated_nested_model_attributes - I18n.backend.store_translations "en", activemodel: { attributes: { :"person/addresses" => { street: "Person Address Street" } } } + I18n.backend.store_translations "en", activemodel: { attributes: { "person/addresses": { street: "Person Address Street" } } } assert_equal "Person Address Street", Person.human_attribute_name("addresses.street") end diff --git a/activemodel/test/cases/validations/validates_test.rb b/activemodel/test/cases/validations/validates_test.rb index af89a5e0b8..011033606e 100644 --- a/activemodel/test/cases/validations/validates_test.rb +++ b/activemodel/test/cases/validations/validates_test.rb @@ -53,7 +53,7 @@ def test_validates_with_validator_class end def test_validates_with_namespaced_validator_class - Person.validates :karma, :'namespace/email' => true + Person.validates :karma, 'namespace/email': true person = Person.new person.valid? assert_equal ["is not an email"], person.errors[:karma]