# File lib/test/unit/assertions.rb, line 849 def assert_nothing_thrown(message="", &proc) _wrap_assertion do assert(block_given?, "Should have passed a block to assert_nothing_thrown") begin proc.call rescue => error extractor = ThrowTagExtractor.new(error) tag = extractor.extract_tag raise if tag.nil? full_message = build_message(message, "<?> was thrown when nothing was expected", tag) flunk(full_message) end assert(true, "Expected nothing to be thrown") end end