Permalink
Browse files

Merge pull request #78 from Marketcircle/minitest-errors

Do not try to coerce an error from MiniTestError
  • Loading branch information...
2 parents d6fff2f + 33fe674 commit 6b454282fc49773b04300c60eaf5c7b036bb2336 @nicksieger nicksieger committed Nov 30, 2012
Showing with 5 additions and 4 deletions.
  1. +3 −3 lib/ci/reporter/minitest.rb
  2. +2 −1 spec/ci/reporter/report_manager_spec.rb
@@ -49,9 +49,9 @@ class MiniTestError < FailureCore
def initialize(fault) @fault = fault end
def failure?() false end
def error?() true end
- def name() @fault.exception.class.name end
- def message() @fault.exception.message end
- def location() @fault.exception.backtrace.join("\n") end
+ def name() @fault.class.name end
+ def message() @fault.message end
+ def location() @fault.backtrace.join("\n") end
end
class Runner < MiniTest::Unit
@@ -43,7 +43,8 @@
suite.should_receive(:name).and_return("some test suite name that goes on and on and on and on and on and on and does not look like it will end any time soon and just when you think it is almost over it just continues to go on and on and on and on and on until it is almost over but wait there is more and then el fin")
suite.should_receive(:to_xml).and_return("<xml></xml>")
reporter.write_report(suite)
- filename = "#{REPORTS_DIR}/SPEC-some-test-suite-name-that-goes-on-and-on-and-on-and-on-and-on-and-on-and-does-not-look-like-it-will-end-any-time-soon-and-just-when-you-think-it-is-almost-over-it-just-continues-t.xml"
+ filename = "#{REPORTS_DIR}/SPEC-some-test-suite-name-that-goes-on-and-on-and-on-and-on-and-on-and-on-and-does-not-look-like-it-will-end-any-time-soon-and-just-when-you-think-it-is-almost-over-it-just-continues-to-go-on-a.xml"
+ filename.length.should be_<= 255
File.exist?(filename).should be_true
File.open(filename) {|f| f.read.should == "<xml></xml>"}
end

0 comments on commit 6b45428

Please sign in to comment.