aboutsummaryrefslogtreecommitdiffstats
path: root/guides/bug_report_templates/action_controller_gem.rb
diff options
context:
space:
mode:
authorRobin Dupret <robin.dupret@gmail.com>2013-12-27 11:30:53 +0100
committerRobin Dupret <robin.dupret@gmail.com>2013-12-27 11:30:53 +0100
commita9444916ee63a9c5f113a7d4a7e9d6eeb39387b6 (patch)
tree7d927a935491370d36b5490cc8b64827fa5f89f6 /guides/bug_report_templates/action_controller_gem.rb
parent864514a460d8fdcd8766ca5a9bba2978038985aa (diff)
downloadrails-a9444916ee63a9c5f113a7d4a7e9d6eeb39387b6.tar.gz
rails-a9444916ee63a9c5f113a7d4a7e9d6eeb39387b6.tar.bz2
rails-a9444916ee63a9c5f113a7d4a7e9d6eeb39387b6.zip
Ensure backward compatibility between Minitest 5 and 4
Define Minitest::Test in case we are running the gist under Minitest 4 and avoid relying on MiniTest::Unit::TestCase to avoid displaying warning on version five. [ci skip]
Diffstat (limited to 'guides/bug_report_templates/action_controller_gem.rb')
-rw-r--r--guides/bug_report_templates/action_controller_gem.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/guides/bug_report_templates/action_controller_gem.rb b/guides/bug_report_templates/action_controller_gem.rb
index 610eccc039..9387e3dc1d 100644
--- a/guides/bug_report_templates/action_controller_gem.rb
+++ b/guides/bug_report_templates/action_controller_gem.rb
@@ -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 \ No newline at end of file
+end