diff options
author | Kir Shatrov <shatrov@me.com> | 2017-06-22 22:59:18 -0400 |
---|---|---|
committer | Kir Shatrov <shatrov@me.com> | 2017-07-01 02:11:03 +0300 |
commit | cfade1ec7ee7b5b51f3c1578e3474f9c156f2971 (patch) | |
tree | 5c12d112bf4d039587d712b0cae92a2d920fee23 /activemodel/test/cases | |
parent | 5fe2a4f929fff7fa725545c47ac0f9372d8c643d (diff) | |
download | rails-cfade1ec7ee7b5b51f3c1578e3474f9c156f2971.tar.gz rails-cfade1ec7ee7b5b51f3c1578e3474f9c156f2971.tar.bz2 rails-cfade1ec7ee7b5b51f3c1578e3474f9c156f2971.zip |
Enforce frozen string in Rubocop
Diffstat (limited to 'activemodel/test/cases')
46 files changed, 46 insertions, 0 deletions
diff --git a/activemodel/test/cases/attribute_assignment_test.rb b/activemodel/test/cases/attribute_assignment_test.rb index fa41d1b95f..5ec55676da 100644 --- a/activemodel/test/cases/attribute_assignment_test.rb +++ b/activemodel/test/cases/attribute_assignment_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/core_ext/hash/indifferent_access" require "active_support/hash_with_indifferent_access" diff --git a/activemodel/test/cases/attribute_methods_test.rb b/activemodel/test/cases/attribute_methods_test.rb index 4767accb7c..4b03c581e9 100644 --- a/activemodel/test/cases/attribute_methods_test.rb +++ b/activemodel/test/cases/attribute_methods_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class ModelWithAttributes diff --git a/activemodel/test/cases/callbacks_test.rb b/activemodel/test/cases/callbacks_test.rb index f85cd7dec4..f236cb3997 100644 --- a/activemodel/test/cases/callbacks_test.rb +++ b/activemodel/test/cases/callbacks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class CallbacksTest < ActiveModel::TestCase diff --git a/activemodel/test/cases/conversion_test.rb b/activemodel/test/cases/conversion_test.rb index 4a93347abc..145a7b4e7f 100644 --- a/activemodel/test/cases/conversion_test.rb +++ b/activemodel/test/cases/conversion_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/contact" require "models/helicopter" diff --git a/activemodel/test/cases/dirty_test.rb b/activemodel/test/cases/dirty_test.rb index fdd18d7601..56abb17e26 100644 --- a/activemodel/test/cases/dirty_test.rb +++ b/activemodel/test/cases/dirty_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class DirtyTest < ActiveModel::TestCase diff --git a/activemodel/test/cases/errors_test.rb b/activemodel/test/cases/errors_test.rb index 43aee5a814..790113331d 100644 --- a/activemodel/test/cases/errors_test.rb +++ b/activemodel/test/cases/errors_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/core_ext/string/strip" require "yaml" diff --git a/activemodel/test/cases/forbidden_attributes_protection_test.rb b/activemodel/test/cases/forbidden_attributes_protection_test.rb index d8cc72e662..b2211b069c 100644 --- a/activemodel/test/cases/forbidden_attributes_protection_test.rb +++ b/activemodel/test/cases/forbidden_attributes_protection_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/core_ext/hash/indifferent_access" require "models/account" diff --git a/activemodel/test/cases/helper.rb b/activemodel/test/cases/helper.rb index eeb5c85a48..be0817624c 100644 --- a/activemodel/test/cases/helper.rb +++ b/activemodel/test/cases/helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "active_model" # Show backtraces for deprecated behavior for quicker cleanup. diff --git a/activemodel/test/cases/lint_test.rb b/activemodel/test/cases/lint_test.rb index 7a817d7c01..29443f212f 100644 --- a/activemodel/test/cases/lint_test.rb +++ b/activemodel/test/cases/lint_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class LintTest < ActiveModel::TestCase diff --git a/activemodel/test/cases/model_test.rb b/activemodel/test/cases/model_test.rb index ba87cd1506..593077a768 100644 --- a/activemodel/test/cases/model_test.rb +++ b/activemodel/test/cases/model_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class ModelTest < ActiveModel::TestCase diff --git a/activemodel/test/cases/naming_test.rb b/activemodel/test/cases/naming_test.rb index d5cb1a62bc..068cb93762 100644 --- a/activemodel/test/cases/naming_test.rb +++ b/activemodel/test/cases/naming_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/contact" require "models/sheep" diff --git a/activemodel/test/cases/railtie_test.rb b/activemodel/test/cases/railtie_test.rb index a56b26b5ee..faace1be85 100644 --- a/activemodel/test/cases/railtie_test.rb +++ b/activemodel/test/cases/railtie_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/testing/isolation" diff --git a/activemodel/test/cases/secure_password_test.rb b/activemodel/test/cases/secure_password_test.rb index 77ce86f392..92368a5512 100644 --- a/activemodel/test/cases/secure_password_test.rb +++ b/activemodel/test/cases/secure_password_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/user" require "models/visitor" diff --git a/activemodel/test/cases/serialization_test.rb b/activemodel/test/cases/serialization_test.rb index f78efd2f0c..8611dcbf0b 100644 --- a/activemodel/test/cases/serialization_test.rb +++ b/activemodel/test/cases/serialization_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/core_ext/object/instance_variables" diff --git a/activemodel/test/cases/serializers/json_serialization_test.rb b/activemodel/test/cases/serializers/json_serialization_test.rb index d15ba64eb0..c6981e86e1 100644 --- a/activemodel/test/cases/serializers/json_serialization_test.rb +++ b/activemodel/test/cases/serializers/json_serialization_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/contact" require "active_support/core_ext/object/instance_variables" diff --git a/activemodel/test/cases/translation_test.rb b/activemodel/test/cases/translation_test.rb index 9972f9daea..aa2c41849d 100644 --- a/activemodel/test/cases/translation_test.rb +++ b/activemodel/test/cases/translation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/person" diff --git a/activemodel/test/cases/type/big_integer_test.rb b/activemodel/test/cases/type/big_integer_test.rb index 56002b7cc6..fba019c01f 100644 --- a/activemodel/test/cases/type/big_integer_test.rb +++ b/activemodel/test/cases/type/big_integer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/binary_test.rb b/activemodel/test/cases/type/binary_test.rb index e9c2ccfca4..b0ae5c3423 100644 --- a/activemodel/test/cases/type/binary_test.rb +++ b/activemodel/test/cases/type/binary_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/boolean_test.rb b/activemodel/test/cases/type/boolean_test.rb index 92e5aebfb7..e8ed904c75 100644 --- a/activemodel/test/cases/type/boolean_test.rb +++ b/activemodel/test/cases/type/boolean_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/date_test.rb b/activemodel/test/cases/type/date_test.rb index 0cc90e99d3..ef21e52361 100644 --- a/activemodel/test/cases/type/date_test.rb +++ b/activemodel/test/cases/type/date_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/date_time_test.rb b/activemodel/test/cases/type/date_time_test.rb index 75a7fc686e..fd717d8793 100644 --- a/activemodel/test/cases/type/date_time_test.rb +++ b/activemodel/test/cases/type/date_time_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/decimal_test.rb b/activemodel/test/cases/type/decimal_test.rb index c3b43725cc..18b1e60127 100644 --- a/activemodel/test/cases/type/decimal_test.rb +++ b/activemodel/test/cases/type/decimal_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/float_test.rb b/activemodel/test/cases/type/float_test.rb index 8026d63ad5..594a7fc668 100644 --- a/activemodel/test/cases/type/float_test.rb +++ b/activemodel/test/cases/type/float_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/immutable_string_test.rb b/activemodel/test/cases/type/immutable_string_test.rb index 23e58974fb..5b2830d4a4 100644 --- a/activemodel/test/cases/type/immutable_string_test.rb +++ b/activemodel/test/cases/type/immutable_string_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/integer_test.rb b/activemodel/test/cases/type/integer_test.rb index a91144036b..67ee6307ea 100644 --- a/activemodel/test/cases/type/integer_test.rb +++ b/activemodel/test/cases/type/integer_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" require "active_support/core_ext/numeric/time" diff --git a/activemodel/test/cases/type/registry_test.rb b/activemodel/test/cases/type/registry_test.rb index 927b6d0307..b2901253a5 100644 --- a/activemodel/test/cases/type/registry_test.rb +++ b/activemodel/test/cases/type/registry_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/string_test.rb b/activemodel/test/cases/type/string_test.rb index 47d412e27e..3c9137c055 100644 --- a/activemodel/test/cases/type/string_test.rb +++ b/activemodel/test/cases/type/string_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/time_test.rb b/activemodel/test/cases/type/time_test.rb index 0cc4d33caa..aa114fc911 100644 --- a/activemodel/test/cases/type/time_test.rb +++ b/activemodel/test/cases/type/time_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/type/value_test.rb b/activemodel/test/cases/type/value_test.rb index d8b3e7f164..d294e86ef9 100644 --- a/activemodel/test/cases/type/value_test.rb +++ b/activemodel/test/cases/type/value_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_model/type" diff --git a/activemodel/test/cases/validations/absence_validation_test.rb b/activemodel/test/cases/validations/absence_validation_test.rb index 833f694c5a..10a42fba59 100644 --- a/activemodel/test/cases/validations/absence_validation_test.rb +++ b/activemodel/test/cases/validations/absence_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" require "models/person" diff --git a/activemodel/test/cases/validations/acceptance_validation_test.rb b/activemodel/test/cases/validations/acceptance_validation_test.rb index fbd994e914..78619abdb8 100644 --- a/activemodel/test/cases/validations/acceptance_validation_test.rb +++ b/activemodel/test/cases/validations/acceptance_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/callbacks_test.rb b/activemodel/test/cases/validations/callbacks_test.rb index f2e4a5946d..9ef59b917a 100644 --- a/activemodel/test/cases/validations/callbacks_test.rb +++ b/activemodel/test/cases/validations/callbacks_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" class Dog diff --git a/activemodel/test/cases/validations/conditional_validation_test.rb b/activemodel/test/cases/validations/conditional_validation_test.rb index 048d27446e..c86124c8ea 100644 --- a/activemodel/test/cases/validations/conditional_validation_test.rb +++ b/activemodel/test/cases/validations/conditional_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/confirmation_validation_test.rb b/activemodel/test/cases/validations/confirmation_validation_test.rb index 7ddf3ad273..1d3e2390e6 100644 --- a/activemodel/test/cases/validations/confirmation_validation_test.rb +++ b/activemodel/test/cases/validations/confirmation_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/exclusion_validation_test.rb b/activemodel/test/cases/validations/exclusion_validation_test.rb index 06ae4fbecd..2bef74fd6c 100644 --- a/activemodel/test/cases/validations/exclusion_validation_test.rb +++ b/activemodel/test/cases/validations/exclusion_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/core_ext/numeric/time" diff --git a/activemodel/test/cases/validations/format_validation_test.rb b/activemodel/test/cases/validations/format_validation_test.rb index f5b1ad721c..3bde650d37 100644 --- a/activemodel/test/cases/validations/format_validation_test.rb +++ b/activemodel/test/cases/validations/format_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb b/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb index f049ee26e8..462a2254d2 100644 --- a/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb +++ b/activemodel/test/cases/validations/i18n_generate_message_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/person" diff --git a/activemodel/test/cases/validations/i18n_validation_test.rb b/activemodel/test/cases/validations/i18n_validation_test.rb index f28cfc0ef5..d6a00a6630 100644 --- a/activemodel/test/cases/validations/i18n_validation_test.rb +++ b/activemodel/test/cases/validations/i18n_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/person" diff --git a/activemodel/test/cases/validations/inclusion_validation_test.rb b/activemodel/test/cases/validations/inclusion_validation_test.rb index 5aa43ea4a9..537ff45626 100644 --- a/activemodel/test/cases/validations/inclusion_validation_test.rb +++ b/activemodel/test/cases/validations/inclusion_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "active_support/all" diff --git a/activemodel/test/cases/validations/length_validation_test.rb b/activemodel/test/cases/validations/length_validation_test.rb index 95ee87b401..03e73546da 100644 --- a/activemodel/test/cases/validations/length_validation_test.rb +++ b/activemodel/test/cases/validations/length_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/numericality_validation_test.rb b/activemodel/test/cases/validations/numericality_validation_test.rb index c0158e075f..aadc825b52 100644 --- a/activemodel/test/cases/validations/numericality_validation_test.rb +++ b/activemodel/test/cases/validations/numericality_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/presence_validation_test.rb b/activemodel/test/cases/validations/presence_validation_test.rb index 642dd0f144..af3d7401ed 100644 --- a/activemodel/test/cases/validations/presence_validation_test.rb +++ b/activemodel/test/cases/validations/presence_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/validates_test.rb b/activemodel/test/cases/validations/validates_test.rb index 011033606e..fe602a2316 100644 --- a/activemodel/test/cases/validations/validates_test.rb +++ b/activemodel/test/cases/validations/validates_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/person" require "models/topic" diff --git a/activemodel/test/cases/validations/validations_context_test.rb b/activemodel/test/cases/validations/validations_context_test.rb index 25c37a572f..04108eb2a0 100644 --- a/activemodel/test/cases/validations/validations_context_test.rb +++ b/activemodel/test/cases/validations/validations_context_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations/with_validation_test.rb b/activemodel/test/cases/validations/with_validation_test.rb index 5ce86738cd..70f1337035 100644 --- a/activemodel/test/cases/validations/with_validation_test.rb +++ b/activemodel/test/cases/validations/with_validation_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" diff --git a/activemodel/test/cases/validations_test.rb b/activemodel/test/cases/validations_test.rb index 6647191205..83be8b26da 100644 --- a/activemodel/test/cases/validations_test.rb +++ b/activemodel/test/cases/validations_test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "cases/helper" require "models/topic" |