diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-13 17:00:55 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-13 17:00:55 -0300 |
commit | 1e45fbc2d4fb59a594e51445aac0e48df8923550 (patch) | |
tree | ec12dba27891748160494f821e649236b54adc57 | |
parent | f5ae87f8d689b474bf3e98f5014ba36ebd807367 (diff) | |
parent | 0c9287dc4ef3b025eddd8051a2f3d5427bfabf86 (diff) | |
download | rails-1e45fbc2d4fb59a594e51445aac0e48df8923550.tar.gz rails-1e45fbc2d4fb59a594e51445aac0e48df8923550.tar.bz2 rails-1e45fbc2d4fb59a594e51445aac0e48df8923550.zip |
Merge pull request #15696 from sgrif/sg-bad-test
Reorder test which does not represent real world usage
-rw-r--r-- | activerecord/test/cases/attribute_methods_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb index a366caf875..f832ca3451 100644 --- a/activerecord/test/cases/attribute_methods_test.rb +++ b/activerecord/test/cases/attribute_methods_test.rb @@ -451,10 +451,10 @@ class AttributeMethodsTest < ActiveRecord::TestCase end def test_declared_suffixed_attribute_method_affects_respond_to_and_method_missing - topic = @target.new(:title => 'Budget') %w(_default _title_default _it! _candidate= able?).each do |suffix| @target.class_eval "def attribute#{suffix}(*args) args end" @target.attribute_method_suffix suffix + topic = @target.new(:title => 'Budget') meth = "title#{suffix}" assert topic.respond_to?(meth) @@ -465,10 +465,10 @@ class AttributeMethodsTest < ActiveRecord::TestCase end def test_declared_affixed_attribute_method_affects_respond_to_and_method_missing - topic = @target.new(:title => 'Budget') [['mark_', '_for_update'], ['reset_', '!'], ['default_', '_value?']].each do |prefix, suffix| @target.class_eval "def #{prefix}attribute#{suffix}(*args) args end" @target.attribute_method_affix({ :prefix => prefix, :suffix => suffix }) + topic = @target.new(:title => 'Budget') meth = "#{prefix}title#{suffix}" assert topic.respond_to?(meth) |