diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-07-28 23:52:53 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-07-30 17:54:00 -0500 |
commit | 94dabf9b4bf14de665cb17570209078f16920e54 (patch) | |
tree | 467bcebef4282d94631fe77fc857cdbf999ed438 /activerecord/test | |
parent | c2b075bed084a59a674469d09db016aaa3365c2e (diff) | |
download | rails-94dabf9b4bf14de665cb17570209078f16920e54.tar.gz rails-94dabf9b4bf14de665cb17570209078f16920e54.tar.bz2 rails-94dabf9b4bf14de665cb17570209078f16920e54.zip |
Generate methods for all suffixes
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/attribute_methods_test.rb | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb index 183be1e2f9..77e406bbba 100644 --- a/activerecord/test/cases/attribute_methods_test.rb +++ b/activerecord/test/cases/attribute_methods_test.rb @@ -74,10 +74,6 @@ class AttributeMethodsTest < ActiveRecord::TestCase end end - def test_primary_key_implemented - assert Class.new(ActiveRecord::Base).instance_method_already_implemented?('id') - end - def test_defined_kernel_methods_implemented_in_model %w(test name display y).each do |method| klass = Class.new ActiveRecord::Base @@ -96,16 +92,6 @@ class AttributeMethodsTest < ActiveRecord::TestCase end end - def test_raises_dangerous_attribute_error_when_defining_activerecord_method_in_model - %w(save create_or_update).each do |method| - klass = Class.new ActiveRecord::Base - klass.class_eval "def #{method}() 'defined #{method}' end" - assert_raise ActiveRecord::DangerousAttributeError do - klass.instance_method_already_implemented?(method) - end - end - end - def test_only_time_related_columns_are_meant_to_be_cached_by_default expected = %w(datetime timestamp time date).sort assert_equal expected, ActiveRecord::Base.attribute_types_cached_by_default.map(&:to_s).sort |