diff --git a/activerecord/test/cases/associations/has_one_associations_test.rb b/activerecord/test/cases/associations/has_one_associations_test.rb index d5dbb88886cb9..7372f2da1b6e8 100644 --- a/activerecord/test/cases/associations/has_one_associations_test.rb +++ b/activerecord/test/cases/associations/has_one_associations_test.rb @@ -186,15 +186,6 @@ def test_succesful_build_association assert_equal account, firm.account end - def test_failing_build_association - firm = Firm.new("name" => "GlobalMegaCorp") - firm.save - - account = firm.build_account - assert !account.save - assert_equal ["can't be empty"], account.errors["credit_limit"] - end - def test_build_association_twice_without_saving_affects_nothing count_of_account = Account.count firm = Firm.find(:first) diff --git a/activerecord/test/cases/associations/join_model_test.rb b/activerecord/test/cases/associations/join_model_test.rb index e9af5a60d8ad2..8bdf8bcd55bf9 100644 --- a/activerecord/test/cases/associations/join_model_test.rb +++ b/activerecord/test/cases/associations/join_model_test.rb @@ -52,18 +52,6 @@ def test_has_many_uniq_through_dynamic_find assert_equal 1, authors(:mary).unique_categorized_posts.find_all_by_title("So I was thinking").size end - def test_polymorphic_has_many - assert posts(:welcome).taggings.include?(taggings(:welcome_general)) - end - - def test_polymorphic_has_one - assert_equal taggings(:welcome_general), posts(:welcome).tagging - end - - def test_polymorphic_belongs_to - assert_equal posts(:welcome), posts(:welcome).taggings.first.taggable - end - def test_polymorphic_has_many_going_through_join_model assert_equal tags(:general), tag = posts(:welcome).tags.first assert_no_queries do diff --git a/activerecord/test/cases/reflection_test.rb b/activerecord/test/cases/reflection_test.rb index 2c9158aa7bf50..67818622d7935 100644 --- a/activerecord/test/cases/reflection_test.rb +++ b/activerecord/test/cases/reflection_test.rb @@ -22,12 +22,6 @@ def test_human_name assert_equal "Subscriber", Subscriber.model_name.human end - def test_column_null_not_null - subscriber = Subscriber.find(:first) - assert subscriber.column_for_attribute("name").null - assert !subscriber.column_for_attribute("nick").null - end - def test_read_attribute_names assert_equal( %w( id title author_name author_email_address bonus_time written_on last_read content approved replies_count parent_id parent_title type ).sort, diff --git a/activerecord/test/cases/validations/i18n_validation_test.rb b/activerecord/test/cases/validations/i18n_validation_test.rb index a0ff35f948e9b..38fa2b821ddc4 100644 --- a/activerecord/test/cases/validations/i18n_validation_test.rb +++ b/activerecord/test/cases/validations/i18n_validation_test.rb @@ -47,25 +47,6 @@ def test_validates_uniqueness_of_generates_message_with_custom_default_message @topic.valid? end - # validates_uniqueness_of w/o mocha - - def test_validates_associated_finds_custom_model_key_translation - I18n.backend.store_translations 'en', :activerecord => {:errors => {:models => {:topic => {:attributes => {:title => {:taken => 'custom message'}}}}}} - I18n.backend.store_translations 'en', :activerecord => {:errors => {:messages => {:taken => 'global message'}}} - - Topic.validates_uniqueness_of :title - unique_topic.valid? - assert_equal ['custom message'], unique_topic.errors[:replies] - end - - def test_validates_associated_finds_global_default_translation - I18n.backend.store_translations 'en', :activerecord => {:errors => {:messages => {:taken => 'global message'}}} - - Topic.validates_uniqueness_of :title - unique_topic.valid? - assert_equal ['global message'], unique_topic.errors[:replies] - end - # validates_associated w/ mocha def test_validates_associated_generates_message