mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #13505 from robin850/patch-13
Ensure backward compatibility between Minitest 5 and 4
This commit is contained in:
commit
b33555d3ef
2 changed files with 7 additions and 1 deletions
|
@ -29,6 +29,9 @@ end
|
|||
require 'minitest/autorun'
|
||||
require 'rack/test'
|
||||
|
||||
# Ensure backward compatibility with Minitest 4
|
||||
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
|
||||
|
||||
class BugTest < Minitest::Test
|
||||
include Rack::Test::Methods
|
||||
|
||||
|
@ -41,4 +44,4 @@ class BugTest < Minitest::Test
|
|||
def app
|
||||
Rails.application
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,6 +4,9 @@ require 'active_record'
|
|||
require 'minitest/autorun'
|
||||
require 'logger'
|
||||
|
||||
# Ensure backward compatibility with Minitest 4
|
||||
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
|
||||
|
||||
# This connection will do for database-independent bug reports.
|
||||
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
|
||||
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
||||
|
|
Loading…
Reference in a new issue