Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Run MiniTest tests in both 1.8 and 1.9 #21

Closed
wants to merge 1 commit into from

2 participants

Jason Morrison Nick Quaranto
Jason Morrison

Pullreq'd upstream in Zeus burke/zeus#146

Jason Morrison jasonm Run MiniTest tests in both 1.8 and 1.9
* In the minitest gem (used only on Ruby 1.8),
  MiniTest::Unit.runner delegates to MiniTest::Unit.new and memoizes the
  result.  This method is not available in the Ruby 1.9 stdlib minitest,
  so we just instantiate a new MiniTest::Unit for cross-compatibility.

* In 1.8, class method MiniTest::Unit.runner:
  https://github.com/seattlerb/minitest/blob/bdbf38df3475dcc8ddd6d11ebede48cdd5f55008/lib/minitest/unit.rb#L808-815

* In 1.9, get a runner instance by constructing a new
* MiniTest::Unit:
  https://github.com/ruby/ruby/blob/v1_9_2_381/lib/minitest/unit.rb#L551-L590
  https://github.com/ruby/ruby/blob/v1_9_3_286/lib/minitest/unit.rb#L531-L883
f6a8048
Nick Quaranto
Owner

I'm not interested in supporting 1.8. :hammer:

Nick Quaranto qrush closed this
Ari Pollak aripollak referenced this pull request in burke/zeus
Closed

Fix running Test::Unit under Ruby 1.9.3 #253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Oct 25, 2012
Jason Morrison jasonm Run MiniTest tests in both 1.8 and 1.9
* In the minitest gem (used only on Ruby 1.8),
  MiniTest::Unit.runner delegates to MiniTest::Unit.new and memoizes the
  result.  This method is not available in the Ruby 1.9 stdlib minitest,
  so we just instantiate a new MiniTest::Unit for cross-compatibility.

* In 1.8, class method MiniTest::Unit.runner:
  https://github.com/seattlerb/minitest/blob/bdbf38df3475dcc8ddd6d11ebede48cdd5f55008/lib/minitest/unit.rb#L808-815

* In 1.9, get a runner instance by constructing a new
* MiniTest::Unit:
  https://github.com/ruby/ruby/blob/v1_9_2_381/lib/minitest/unit.rb#L551-L590
  https://github.com/ruby/ruby/blob/v1_9_3_286/lib/minitest/unit.rb#L531-L883
f6a8048
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/m.rb
2  lib/m.rb
@@ -188,7 +188,7 @@ def execute
188 188
189 189 # directly run the tests from here and exit with the status of the tests passing or failing
190 190 if defined?(MiniTest)
191   - exit MiniTest::Unit.runner.run test_arguments
  191 + exit MiniTest::Unit.new.run test_arguments
192 192 elsif defined?(Test)
193 193 exit Test::Unit::AutoRunner.run(false, nil, test_arguments)
194 194 else

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.