method

fail_with

rspec latest stable - Class: Spec::Expectations
fail_with(message, expected=nil, target=nil)
public

raises a Spec::Expectations::ExpectationNotMetError with message

When a differ has been assigned and fail_with is passed <code>expected</code> and <code>target</code>, passes them to the differ to append a diff message to the failure message.