Exception: RespondAssay
- Defined in:
- lib/assay/respond_assay.rb
Overview
Does an object #respond_to? a method call.
Constant Summary
Constants inherited from Assertion
Constants included from Assay::Assertable
Class Method Summary collapse
-
.pass?(reciever, method_name) ⇒ Boolean
Check assertion.
Methods inherited from Assertion
by_name, by_operator, inherited, register, subclasses
Methods included from Assay::Assertable
#[], #assert!, #assert_message, #assertive_name, #assertor, #fail?, #operator, #pass?, #refute!, #refute_message
Class Method Details
.pass?(reciever, method_name) ⇒ Boolean
Check assertion.
10 11 12 13 14 |
# File 'lib/assay/respond_assay.rb', line 10 def self.pass?(reciever, method_name) #flip = (Symbol === obj) && ! (Symbol === meth) # HACK for specs #obj, meth = meth, obj if flip reciever.respond_to?(method_name) end |