test-unit/lib/test/unit/assertionfailederror.rb in groonga-0.0.7 vs test-unit/lib/test/unit/assertionfailederror.rb in groonga-0.9.0

- old
+ new

@@ -7,8 +7,19 @@ module Test module Unit # Thrown by Test::Unit::Assertions when an assertion fails. class AssertionFailedError < StandardError + attr_accessor :expected, :actual, :user_message + attr_accessor :inspected_expected, :inspected_actual + def initialize(message=nil, options=nil) + options ||= {} + @expected = options[:expected] + @actual = options[:actual] + @inspected_expected = options[:inspected_expected] + @inspected_actual = options[:inspected_actual] + @user_message = options[:user_message] + super(message) + end end end end