## before
$ rake spec output=tap
ok 34 - works with Assets
ok 34 - works with hash
…
ok 34 - should work
1..34
# 34 tests, 61 assertions, 0 failures, 0 errors
## after
$ rake spec output=tap
ok 1 - works with Assets
ok 2 - works with hash
…
ok 34 - should work
1..34
# 34 tests, 61 assertions, 0 failures, 0 errors
A following spec will raise an ArgumentError.
describe "Application 'test'" do
it "has one window"
end
`instance_eval' will pass a receiver object into block.
When use a block which created by lambda, it should accept a receiver object as block parameter.
b = lambda { self.upcase }
"test".instance_eval(&b) #=> wrong number of arguments (1 for 0) (ArgumentError)