Method: RSpec::Matchers::BuiltIn::RaiseError#with_message

Defined in:
lib/rspec/matchers/built_in/raise_error.rb

#with_message(expected_message) ⇒ Object

Specifies the expected error message.



43
44
45
46
47
48
# File 'lib/rspec/matchers/built_in/raise_error.rb', line 43

def with_message(expected_message)
  raise_message_already_set if @expected_message
  @warn_about_bare_error = false
  @expected_message = expected_message
  self
end