Created
February 25, 2013 16:40
-
-
Save bbozo/5031125 to your computer and use it in GitHub Desktop.
Minitest, callbacks of same type in same context get clobbered
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ grep -re test -e should Gemfile.lock | |
remote: git://github.com/bbozo/minitest-colorize.git | |
minitest-colorize (0.0.4.1) | |
minitest (>= 2.0) | |
rack-test (~> 0.6.1) | |
rack-test (>= 0.5.4) | |
minitest (4.5.0) | |
minitest-matchers (1.2.0) | |
minitest (>= 2.5.0) | |
minitest-rails (0.5.1) | |
minitest (~> 4.0) | |
minitest-rails-shoulda (0.4.1) | |
minitest-matchers (~> 1.2.0) | |
minitest-rails (~> 0.5.0) | |
shoulda-matchers (~> 1.4.1) | |
rack-test (0.6.2) | |
shoulda-matchers (1.4.2) | |
minitest (= 4.5.0) | |
minitest-colorize! | |
minitest-rails-shoulda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ zeus test test/unit/test_test.rb | |
Run options: --seed 10849 | |
# Running tests: | |
1 - B | |
2 - B | |
running test | |
2 - B | |
1 - B | |
. | |
Finished tests in 0.124061s, 8.0605 tests/s, 0.0000 assertions/s. | |
1 tests, 0 assertions, 0 failures, 0 errors, 0 skips |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby -v | |
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux] | |
$ rails -v | |
Rails 3.2.11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TestTest < MiniTest::Spec | |
before(:each) do | |
puts "1 - A" | |
end | |
before(:each) do | |
puts "1 - B" | |
end | |
context "a context" do | |
before(:each) do | |
puts "2 - A" | |
end | |
before(:each) do | |
puts "2 - B" | |
end | |
should "boo" do | |
puts "running test" | |
end | |
after(:each) do | |
puts "2 - A" | |
end | |
after(:each) do | |
puts "2 - B" | |
end | |
end | |
after(:each) do | |
puts "1 - A" | |
end | |
after(:each) do | |
puts "1 - B" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment