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.
265 266 267 268 269 270 271 |
# File 'lib/minitest/assertions.rb', line 265 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 |