lib/assert/result.rb in assert-2.1.2 vs lib/assert/result.rb in assert-2.2.0
- old
+ new
@@ -50,10 +50,16 @@
def trace
(self.backtrace.filtered.first || self.test.context_info.called_from).to_s
end
+ # chose to implement this way instead of using an `attr_writer` to be
+ # consistant with how you override exception backtraces.
+ def set_backtrace(bt)
+ @backtrace = Backtrace.new(bt || [])
+ end
+
def ==(other)
self.class == other.class && self.message == other.message
end
def inspect
@@ -108,10 +114,10 @@
end
end
# raised by the 'skip' context helper to break test execution
- class TestSkipped < RuntimeError; end
+ TestSkipped = Class.new(RuntimeError)
class Skip < Base
# skip results are generated by raising Assert::Result::TestSkipped
def initialize(test, exception)