Update AR tests

This commit is contained in:
Jeremy Kemper
2008-11-07 16:22:56 -05:00
parent 15c0774920
commit 1d803e5189
2 changed files with 5 additions and 5 deletions

View File

@@ -641,15 +641,15 @@ end
class FixtureLoadingTest < ActiveRecord::TestCase
uses_mocha 'reloading_fixtures_through_accessor_methods' do
def test_logs_message_for_failed_dependency_load
Test::Unit::TestCase.expects(:require_dependency).with(:does_not_exist).raises(LoadError)
ActiveRecord::TestCase.expects(:require_dependency).with(:does_not_exist).raises(LoadError)
ActiveRecord::Base.logger.expects(:warn)
Test::Unit::TestCase.try_to_load_dependency(:does_not_exist)
ActiveRecord::TestCase.try_to_load_dependency(:does_not_exist)
end
def test_does_not_logs_message_for_successful_dependency_load
Test::Unit::TestCase.expects(:require_dependency).with(:works_out_fine)
ActiveRecord::TestCase.expects(:require_dependency).with(:works_out_fine)
ActiveRecord::Base.logger.expects(:warn).never
Test::Unit::TestCase.try_to_load_dependency(:works_out_fine)
ActiveRecord::TestCase.try_to_load_dependency(:works_out_fine)
end
end
end

View File

@@ -2,7 +2,7 @@ require "cases/helper"
require 'models/topic'
require 'models/reply'
class ActiveRecordValidationsI18nTests < Test::Unit::TestCase
class ActiveRecordValidationsI18nTests < ActiveSupport::TestCase
def setup
reset_callbacks Topic
@topic = Topic.new