test/soap/test_nestedexception.rb in rubyjedi-soap4r-1.5.8.01 vs test/soap/test_nestedexception.rb in rubyjedi-soap4r-1.5.8.20100616125722
- old
+ new
@@ -1,6 +1,6 @@
-require 'test/unit'
+require 'helper'
require 'soap/soap'
module SOAP
@@ -36,21 +36,35 @@
trace = trace.map { |line| line.sub(/\A[^:]*/, '') }
assert_equal(TOBE, trace)
end
end
- TOBE = [
- ":15:in `foo'",
- ":33:in `test_nestedexception'",
- ":23:in `bar': bar (SOAP::TestNestedException::MyError) [NESTED]",
- ":13:in `foo'",
- ":33:in `test_nestedexception'",
- ":28:in `baz': baz (SOAP::TestNestedException::MyError) [NESTED]",
- ":21:in `bar'",
- ":13:in `foo'",
- ":33:in `test_nestedexception'",
- ]
-
+ if (RUBY_VERSION.to_f >= 1.9)
+ TOBE = [
+ ":15:in `rescue in foo'",
+ ":12:in `foo'",
+ ":33:in `test_nestedexception'",
+ ":23:in `rescue in bar': bar (SOAP::TestNestedException::MyError) [NESTED]",
+ ":20:in `bar'",
+ ":13:in `foo'",
+ ":33:in `test_nestedexception'",
+ ":28:in `baz': baz (SOAP::TestNestedException::MyError) [NESTED]",
+ ":21:in `bar'",
+ ":13:in `foo'",
+ ":33:in `test_nestedexception'"
+ ]
+ else
+ TOBE = [
+ ":15:in `foo'",
+ ":33:in `test_nestedexception'",
+ ":23:in `bar': bar (SOAP::TestNestedException::MyError) [NESTED]",
+ ":13:in `foo'",
+ ":33:in `test_nestedexception'",
+ ":28:in `baz': baz (SOAP::TestNestedException::MyError) [NESTED]",
+ ":21:in `bar'",
+ ":13:in `foo'",
+ ":33:in `test_nestedexception'",
+ ]
+ end
end
-
end