Created
May 21, 2011 09:25
-
-
Save lazyatom/984395 to your computer and use it in GitHub Desktop.
Why is Rubinius running this method?
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
$ rvm use default | |
Using /Users/james/.rvm/gems/ree-1.8.7-2010.02 | |
$ ruby testcase_issue.rb | |
Loaded suite testcase_issue | |
Started | |
. | |
Finished in 0.000416 seconds. | |
1 tests, 0 assertions, 0 failures, 0 errors | |
$ rvm use 1.9.2 | |
Using /Users/james/.rvm/gems/ruby-1.9.2-p180 | |
$ ruby testcase_issue.rb | |
Loaded suite testcase_issue | |
Started | |
. | |
Finished in 0.000437 seconds. | |
1 tests, 0 assertions, 0 failures, 0 errors, 0 skips | |
Test run options: --seed 46451 | |
$ rvm use rbx | |
Using /Users/james/.rvm/gems/rbx-head | |
$ ruby testcase_issue.rb | |
Loaded suite testcase_issue | |
Started | |
.E | |
Finished in 0.001179 seconds. | |
1) Error: | |
test_thing(Blah): | |
RuntimeError: Why am I being called! | |
testcase_issue.rb:14:in `test_thing' | |
kernel/bootstrap/array.rb:76:in `each' | |
kernel/bootstrap/array.rb:76:in `each' | |
2 tests, 0 assertions, 0 failures, 1 errors |
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
require "test/unit" | |
class Blah < Test::Unit::TestCase | |
def test_something | |
end | |
end | |
def test_other_thing(*args, &block) | |
raise "I should not be called because I am not in a TestCase, and am not." | |
end | |
1.times do | |
def test_thing(*args, &block) | |
raise "Why am I being called!" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment