# File test/unit/assertions.rb, line 97 def assert_instance_of(klass, object, message="") _wrap_assertion { assert_equal(Class, klass.class, "assert_instance_of takes a Class as its first argument") full_message = build_message(message, object, klass, object.class) { | arg1, arg2, arg3 | "<#{arg1}> expected to be an instance of\n" + "<#{arg2}> but was\n" + "<#{arg3}>" } assert_block(full_message) { klass == object.class } } end