Skip to content
This repository

Fixed failures dump #15

Merged
merged 3 commits into from over 2 years ago

3 participants

necolt Nick Sieger Saulius Grigaitis
necolt

There was no failures dump at the end of test suite.

Nick Sieger
Owner

Thanks!

Nick Sieger nicksieger merged commit 545ddea into from
Nick Sieger nicksieger closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
4  ci_reporter.gemspec
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
9 9
   s.date = %q{2010-10-12}
10 10
   s.description = %q{CI::Reporter is an add-on to Test::Unit, RSpec and Cucumber that allows you to generate XML reports of your test, spec and/or feature runs. The resulting files can be read by a continuous integration system that understands Ant's JUnit report XML format, thus allowing your CI system to track test/spec successes and failures.}
11 11
   s.email = %q{nick@nicksieger.com}
12  
-  s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt", "LICENSE.txt"]
13  
-  s.files = ["History.txt", "Manifest.txt", "README.txt", "LICENSE.txt", "Rakefile", "stub.rake", "lib/ci/reporter/core.rb", "lib/ci/reporter/cucumber.rb", "lib/ci/reporter/report_manager.rb", "lib/ci/reporter/rspec.rb", "lib/ci/reporter/test_suite.rb", "lib/ci/reporter/test_unit.rb", "lib/ci/reporter/version.rb", "lib/ci/reporter/rake/cucumber.rb", "lib/ci/reporter/rake/cucumber_loader.rb", "lib/ci/reporter/rake/rspec.rb", "lib/ci/reporter/rake/rspec_loader.rb", "lib/ci/reporter/rake/test_unit.rb", "lib/ci/reporter/rake/test_unit_loader.rb", "lib/ci/reporter/rake/utils.rb", "spec/spec_helper.rb", "spec/ci/reporter/cucumber_spec.rb", "spec/ci/reporter/output_capture_spec.rb", "spec/ci/reporter/report_manager_spec.rb", "spec/ci/reporter/rspec_spec.rb", "spec/ci/reporter/test_suite_spec.rb", "spec/ci/reporter/test_unit_spec.rb", "spec/ci/reporter/rake/rake_tasks_spec.rb", "tasks/ci_reporter.rake"]
  12
+  s.extra_rdoc_files = ["History.txt", "README.txt", "LICENSE.txt"]
  13
+  s.files = ["History.txt", "README.txt", "LICENSE.txt", "Rakefile", "stub.rake", "lib/ci/reporter/core.rb", "lib/ci/reporter/cucumber.rb", "lib/ci/reporter/report_manager.rb", "lib/ci/reporter/rspec.rb", "lib/ci/reporter/test_suite.rb", "lib/ci/reporter/test_unit.rb", "lib/ci/reporter/version.rb", "lib/ci/reporter/rake/cucumber.rb", "lib/ci/reporter/rake/cucumber_loader.rb", "lib/ci/reporter/rake/rspec.rb", "lib/ci/reporter/rake/rspec_loader.rb", "lib/ci/reporter/rake/test_unit.rb", "lib/ci/reporter/rake/test_unit_loader.rb", "spec/spec_helper.rb", "spec/ci/reporter/cucumber_spec.rb", "spec/ci/reporter/output_capture_spec.rb", "spec/ci/reporter/report_manager_spec.rb", "spec/ci/reporter/rspec_spec.rb", "spec/ci/reporter/test_suite_spec.rb", "spec/ci/reporter/test_unit_spec.rb", "spec/ci/reporter/rake/rake_tasks_spec.rb", "tasks/ci_reporter.rake"]
14 14
   s.homepage = %q{http://caldersphere.rubyforge.org/ci_reporter}
15 15
   s.rdoc_options = ["--main", "README.txt", "-SHN", "-f", "darkfish"]
16 16
   s.require_paths = ["lib"]
7  lib/ci/reporter/rspec.rb
@@ -43,9 +43,9 @@ def error?
43 43
         !failure?
44 44
       end
45 45
 
46  
-      def name() exception.class.name end
47  
-      def message() exception.message end
48  
-      def location() (exception.backtrace || ["No backtrace available"]).join("\n") end
  46
+      def name() @example.metadata[:execution_result][:exception].class.name end
  47
+      def message() @example.metadata[:execution_result][:exception].message end
  48
+      def location() @example.metadata[:execution_result][:exception].backtrace.join("\n") end
49 49
     end
50 50
 
51 51
     class RSpec2Failure < RSpecFailure
@@ -144,6 +144,7 @@ def dump_failure(*args)
144 144
       def dump_summary(*args)
145 145
         @formatter.dump_summary(*args)
146 146
         write_report
  147
+        @formatter.dump_failures
147 148
       end
148 149
 
149 150
       def dump_pending
4  spec/ci/reporter/rspec_spec.rb
@@ -53,6 +53,7 @@
53 53
     @formatter.should_receive(:dump_failure).once
54 54
     @formatter.should_receive(:dump_summary).once
55 55
     @formatter.should_receive(:dump_pending).once
  56
+    @formatter.should_receive(:dump_failures).once
56 57
     @formatter.should_receive(:close).once
57 58
 
58 59
     @fmt.start(3)
@@ -76,6 +77,7 @@
76 77
     @formatter.should_receive(:example_started).once
77 78
     @formatter.should_receive(:example_passed).once
78 79
     @formatter.should_receive(:dump_summary)
  80
+    @formatter.should_receive(:dump_failures).once
79 81
     @report_mgr.should_receive(:write_report)
80 82
 
81 83
     @fmt.start(2)
@@ -96,6 +98,7 @@
96 98
     @formatter.should_receive(:example_started).with(example).once
97 99
     @formatter.should_receive(:example_passed).once
98 100
     @formatter.should_receive(:dump_summary)
  101
+    @formatter.should_receive(:dump_failures).once
99 102
     @report_mgr.should_receive(:write_report).and_return do |suite|
100 103
       suite.testcases.last.name.should == "should do something"
101 104
     end
@@ -116,6 +119,7 @@
116 119
     @formatter.should_receive(:example_started).once
117 120
     @formatter.should_receive(:example_failed).once
118 121
     @formatter.should_receive(:dump_summary)
  122
+    @formatter.should_receive(:dump_failures).once
119 123
     @report_mgr.should_receive(:write_report)
120 124
 
121 125
     @fmt.start(2)
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.