lib/rspec/matchers/fail_matchers.rb
# Matches if an expectation fails including the provided message
#
# @example
#   expect { some_expectation }.to fail_including("portion of some failure message")
Matches if an expectation fails including the provided message
Matches if an expectation fails including the provided message
def fail_including(*snippets)
        raise_error(
          RSpec::Expectations::ExpectationNotMetError,
          a_string_including(*snippets)
        )
      end
def fail_including ( * snippets ) raise_error ( RSpec :: Expectations :: ExpectationNotMetError , a_string_including ( * snippets ) ) end
Matches if an expectation fails including the provided message
Matches if an expectation fails including the provided message
snippets
example
expect { some_expectation }.to fail_including("portion of some failure message")
expect { some_expectation } . to fail_including ( " portion of some failure message " )