mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Update AR tests
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user