MiniTest::Unit.after_tests is executed before tests under ruby 1.9.3.preview #25

Closed
paneq opened this Issue Aug 5, 2011 · 2 comments

Projects

None yet

2 participants

@paneq
paneq commented Aug 5, 2011
# Uncomment to use v2.3.1 shipped as gem - the bug still occurs
# require 'rubygems'
# gem 'minitest'

require 'minitest/unit'
require 'minitest/autorun'

class MyTest < MiniTest::Unit::TestCase

  def test_vip
    assert true
  end

end

MiniTest::Unit.after_tests() { puts "after?" }

The output on ruby 1.9.2 when running the version from rubygems (because the version shipped with ruby does not have MiniTest::Unit.after_tests method implemented) is:

10:47 <ruby-1.9.2-p180> ~/develop/test/mini193  > ruby t_test.rb 
Run options: --seed 34973

# Running tests:

.

Finished tests in 0.000405s, 2468.2216 tests/s, 2468.2216 assertions/s.

1 tests, 1 assertions, 0 failures, 0 errors, 0 skips
after?

The output form 1.9.3 (gem version or shipped with ruby - does not matter) is :

10:48 <ruby-1.9.3-preview1> ~/develop/test/mini193  > ruby t_test.rb 
after?
Run options: --seed 54324

# Running tests:

.

Finished tests in 0.000409s, 2446.2977 tests/s, 2446.2977 assertions/s.

1 tests, 1 assertions, 0 failures, 0 errors, 0 skips

My guess would be that something about at_exit behavior changed in 1.9.3 .

@zenspider zenspider was assigned Aug 15, 2011
@zenspider
Member

I've confirmed that this is indeed a bug in 1.9.3 tho I can't find the ticket :/

@zenspider zenspider closed this Aug 16, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment