Method: Minitest::Assertions#assert_instance_of
- Defined in:
- lib/minitest/assertions.rb
#assert_instance_of(cls, obj, msg = nil) ⇒ Object
Fails unless obj is an instance of cls.
272 273 274 275 276 277 278 |
# File 'lib/minitest/assertions.rb', line 272 def assert_instance_of cls, obj, msg = nil msg = (msg) { "Expected #{mu_pp(obj)} to be an instance of #{cls}, not #{obj.class}" } assert obj.instance_of?(cls), msg end |