Method: Mini::Assertions#refute_instance_of
- Defined in:
- lib/mini/test.rb
#refute_instance_of(cls, obj, msg = nil) ⇒ Object
237 238 239 240 241 242 |
# File 'lib/mini/test.rb', line 237 def refute_instance_of cls, obj, msg = nil msg = msg, "Expected #{mu_pp(obj)} to not be an instance of #{cls}" flip = (Module === obj) && ! (Module === cls) # HACK for specs obj, cls = cls, obj if flip refute cls === obj, msg end |