Module: RspecRailsMatchers::Message

Defined in:
lib/rspec_rails_matchers/message.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) error(options = {})



3
4
5
6
7
8
9
# File 'lib/rspec_rails_matchers/message.rb', line 3

def self.error( options = {} )
  msg =    %(expected #{transform(options[:expected])})
  msg << %(\n     got #{transform(options[:got])}) if options[:got]
  msg << %(\n  actual #{transform(options[:actual])}) if options[:actual]
  msg << %(\n)
  msg
end