ruby - How to attach message to rspec check? -
in rspec: can attach message check same way in xunit style test frameworks? how?
assert_equal value1, value2, "something wrong"
should
, should_not
take second argument (message
) overrides matcher’s default message.
1.should be(2), 'one not two!'
the default messages pretty useful though.
update:
for rspec 3:
expect(1).to eq(2), "one not two!"
Comments
Post a Comment