diff options
Diffstat (limited to 'guides/bug_report_templates/active_record_gem.rb')
-rw-r--r-- | guides/bug_report_templates/active_record_gem.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/guides/bug_report_templates/active_record_gem.rb b/guides/bug_report_templates/active_record_gem.rb index 2e604bec47..d72633d0b2 100644 --- a/guides/bug_report_templates/active_record_gem.rb +++ b/guides/bug_report_templates/active_record_gem.rb @@ -1,9 +1,12 @@ # Activate the gem you are reporting the issue against. -gem 'activerecord', '3.2.13' +gem 'activerecord', '4.0.0' 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) @@ -25,7 +28,7 @@ class Comment < ActiveRecord::Base belongs_to :post end -class BugTest < MiniTest::Unit::TestCase +class BugTest < Minitest::Test def test_association_stuff post = Post.create! post.comments << Comment.create! |