1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/cases/test_fixtures_test.rb
Xavier Noria 9617db2078 applies new string literal convention in activerecord/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:26:53 +02:00

36 lines
952 B
Ruby

require "cases/helper"
class TestFixturesTest < ActiveRecord::TestCase
setup do
@klass = Class.new
@klass.send(:include, ActiveRecord::TestFixtures)
end
def test_deprecated_use_transactional_fixtures=
assert_deprecated "use use_transactional_tests= instead" do
@klass.use_transactional_fixtures = true
end
end
def test_use_transactional_tests_prefers_use_transactional_fixtures
ActiveSupport::Deprecation.silence do
@klass.use_transactional_fixtures = false
end
assert_equal false, @klass.use_transactional_tests
end
def test_use_transactional_tests_defaults_to_true
ActiveSupport::Deprecation.silence do
@klass.use_transactional_fixtures = nil
end
assert_equal true, @klass.use_transactional_tests
end
def test_use_transactional_tests_can_be_overridden
@klass.use_transactional_tests = "foobar"
assert_equal "foobar", @klass.use_transactional_tests
end
end