Class: Spec::Expectations::Should::NegativeItemHandler

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



120
121
122
123
124
# File 'lib/spec/expectations/should/have.rb', line 120

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