Method: Mini::Assertions#assert_instance_of
- Defined in:
- lib/mini/test.rb
#assert_instance_of(cls, obj, msg = nil) ⇒ Object
90 91 92 93 94 95 |
# File 'lib/mini/test.rb', line 90 def assert_instance_of cls, obj, msg = nil msg = msg, "Expected #{mu_pp(obj)} to be an instance of #{cls}" flip = (Module === obj) && ! (Module === cls) # HACK for specs obj, cls = cls, obj if flip assert cls === obj, msg end |