test/test_helper.rb in secondbase-1.0.1 vs test/test_helper.rb in secondbase-2.0.0
- old
+ new
@@ -3,19 +3,29 @@
require 'bundler/setup'
Bundler.require :default, :development
require 'second_base'
require 'active_support/test_case'
require 'active_support/testing/autorun'
-require 'dummy_app/init'
+
+if Rails.version.to_i == 4
+ require 'dummy_apps/rails_four/init'
+else
+ require 'dummy_apps/rails_five/init'
+end
+
require 'rails/test_help'
Dir['test/test_helpers/*.{rb}'].each { |f| require_relative "../#{f}" }
ActiveSupport.test_order = :random if ActiveSupport.respond_to?(:test_order)
module SecondBase
class TestCase < ActiveSupport::TestCase
- self.use_transactional_fixtures = false
+ if Rails.version.to_i == 4
+ self.use_transactional_fixtures = false
+ else
+ self.use_transactional_tests = false
+ end
include RailsVersionHelpers,
DummyAppHelpers,
StreamHelpers