wrong
wrong copied to clipboard
Puzzling behavior with eventually and rspec be_nil matcher
I found an odd behavior when using eventually and should_not be_nil.
it "should work with be_nil" do
found = "X"
eventually {
found.should_not be_nil
}
end
Error message is:
Expected found.should_not(be_nil), but found is "X" be_nil is #<RSpec::Matchers::BuiltIn::BeNil:0x007ff531aea8e8 @expected=nil>
Am I doing anything wrong?