Module: RSpec::Matchers::FailMatchers
Relationships & Source Files | |
Defined in: | rspec-expectations/lib/rspec/matchers/fail_matchers.rb |
Overview
Instance Method Summary
-
#fail(&block)
Matches if an expectation fails.
-
#fail_including(*snippets)
Matches if an expectation fails including the provided message.
-
#fail_with(message)
Matches if an expectation fails with the provided message.
Instance Method Details
#fail(&block)
Matches if an expectation fails
# File 'rspec-expectations/lib/rspec/matchers/fail_matchers.rb', line 17
def fail(&block) raise_error(RSpec::Expectations::ExpectationNotMetError, &block) end
#fail_including(*snippets)
Matches if an expectation fails including the provided message
# File 'rspec-expectations/lib/rspec/matchers/fail_matchers.rb', line 34
def fail_including(*snippets) raise_error( RSpec::Expectations::ExpectationNotMetError, a_string_including(*snippets) ) end
#fail_with(message)
Matches if an expectation fails with the provided message
# File 'rspec-expectations/lib/rspec/matchers/fail_matchers.rb', line 26
def fail_with( ) raise_error(RSpec::Expectations::ExpectationNotMetError, ) end