Class: RSpec::Expectations::ExpectationHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/expectations/handler.rb

Direct Known Subclasses

NegativeExpectationHandler, PositiveExpectationHandler

Class Method Summary (collapse)

Class Method Details

+ (Object) check_message(msg)

5
6
7
8
9
10
11
12
13
# File 'lib/rspec/expectations/handler.rb', line 5
def self.check_message(msg)
  unless msg.nil? || msg.respond_to?(:to_str) || msg.respond_to?(:call)
    ::Kernel.warn [
      "WARNING: ignoring the provided expectation message argument (",
      msg.inspect,
      ") since it is not a string or a proc."
    ].join
  end
end