Permalink
Browse files

Remove deprecated #use_transactional_fixtures configuration

  • Loading branch information...
rafaelfranca committed Dec 29, 2016
1 parent 8029f77 commit 3955218dc163f61c932ee80af525e7cd440514b3
@@ -1,3 +1,7 @@
* Remove deprecated `#use_transactional_fixtures` configuration.
*Rafael Mendonça França*
* Remove deprecated `#raise_in_transactional_callbacks` configuration.
*Rafael Mendonça França*
@@ -862,29 +862,17 @@ def after_teardown # :nodoc:
class_attribute :fixture_table_names
class_attribute :fixture_class_names
class_attribute :use_transactional_tests
class_attribute :use_transactional_fixtures
class_attribute :use_instantiated_fixtures # true, false, or :no_instances
class_attribute :pre_loaded_fixtures
class_attribute :config
singleton_class.deprecate "use_transactional_fixtures=" => "use use_transactional_tests= instead"
self.fixture_table_names = []
self.use_instantiated_fixtures = false
self.pre_loaded_fixtures = false
self.config = ActiveRecord::Base
self.fixture_class_names = {}
silence_warnings do
define_singleton_method :use_transactional_tests do
if use_transactional_fixtures.nil?
true
else
use_transactional_fixtures
end
end
end
self.use_transactional_tests = true
end
module ClassMethods
@@ -6,25 +6,7 @@ class TestFixturesTest < ActiveRecord::TestCase
@klass.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

0 comments on commit 3955218

Please sign in to comment.