Class: SpecExpectation

Inherits:
Object show all
Defined in:
lib/extensions/mspec/mspec/expectations/expectations.rb

Class Method Summary collapse

Class Method Details

.fail_with(expected, actual) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/extensions/mspec/mspec/expectations/expectations.rb', line 9

def self.fail_with(expected, actual)
  if expected.to_s.size + actual.to_s.size > 80
    message = expected.to_s.chomp + "\n" + actual.to_s
  else
    message = expected.to_s + " " + actual.to_s
  end
  Kernel.raise SpecExpectationNotMetError, message
end