Class: Spec::Expectations::Should::PositiveItemHandler

Inherits:
ItemHandler show all
Defined in:
lib/spec/expectations/should/have.rb

Instance Method Summary collapse

Methods inherited from ItemHandler

#fail_with, #initialize, #wants_to_handle

Constructor Details

This class inherits a constructor from Spec::Expectations::Should::ItemHandler

Instance Method Details

#handle_message(sym, *args) ⇒ Object



112
113
114
115
116
# File 'lib/spec/expectations/should/have.rb', line 112

def handle_message(sym, *args)
  fail_with(
  "expected #has_#{sym}?(#{args.collect{|arg| arg.inspect}.join(', ')}) to return true, got false"
  ) unless @target.send("has_#{sym}?", *args)
end