Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Why is Rubinius running this method?

View Shell output
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
$ 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
View Shell output
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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
Something went wrong with that request. Please try again.