I have a helper that performs:
def send_to_block(value, &block)
capture(value, &block)
end
When writing a test:
value_received = nil
send_to_block('test') do |value|
value_received = value
end
value_received.should == 'test'
I am getting the following exception:
NameError: uninitialized constant Kernel::DISABLED
Any ideas?
You’ll want to use the helper object as described in: https://www.relishapp.com/rspec/rspec-rails/v/2-11/docs/helper-specs/helper-spec
Something along these lines should be what you’re after: