Created
June 20, 2016 13:09
-
-
Save anonymous/fbf16511cf6ea6f25e5feef5606d7221 to your computer and use it in GitHub Desktop.
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_helper' | |
class AlertsControllerTest < ActiveSupport::TestCase | |
def self.foo(p) | |
context "whatever" do | |
should "do things" do | |
assert_equal 1,1 | |
assert true | |
p.call | |
end | |
end | |
end | |
foo(Proc.new{ assert true } ) | |
end | |
------- | |
Above line numbers match -- this is blowing up on 'p.call' not the two assertions immediately above it. | |
1) Error: | |
AlertsControllerTest#test_: whatever should do things. : | |
NoMethodError: undefined method `assert' for AlertsControllerTest:Class | |
test/controllers/alerts_controller_test.rb:15:in `block in <class:AlertsControllerTest>' | |
test/controllers/alerts_controller_test.rb:10:in `block (2 levels) in foo' | |
1 runs, 2 assertions, 0 failures, 1 errors, 0 skips |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment