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

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -