# File test/unit/assertions.rb, line 179 def assert_nothing_raised(*args) _wrap_assertion { message = "" if (!args[-1].instance_of?(Class)) message = args.pop end begin yield rescue Exception => thrown_exception if (args.empty? || args.include?(thrown_exception.class)) full_message = build_message(message, thrown_exception.class.name, thrown_exception.message, thrown_exception.backtrace.join("\n\t")) { | arg1, arg2, arg3 | "Exception raised: <#{arg1}: #{arg2}\n\t#{arg3}>" } flunk(full_message) else raise thrown_exception.class, thrown_exception.message, thrown_exception.backtrace end end } end