Class: RSpec::Expectations::ExpectationHandler

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

Class Method Summary collapse

Class Method Details

.check_message(msg) ⇒ Object



10
11
12
# File 'lib/rspec/expectations/handler.rb', line 10

def self.check_message(msg)
  ::Kernel.warn message_must_be_string(msg) unless msg.nil? || msg.is_a?(String)
end

.message_must_be_string(msg) ⇒ Object



5
6
7
8
# File 'lib/rspec/expectations/handler.rb', line 5

def self.message_must_be_string(msg)
  "WARNING: ignoring the provided expectation message argument " +
  "(#{msg.inspect}) since it is not a string."
end