Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #15 from necolt/master

Fixed failures dump
  • Loading branch information...
commit 545ddea7d57b8c6fe06b072977ac5e404381a26c 2 parents dc3c2bb + eca73f1
@nicksieger nicksieger authored
View
4 ci_reporter.gemspec
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
s.date = %q{2011-06-14}
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.}
s.email = %q{nick@nicksieger.com}
- s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt", "LICENSE.txt"]
- 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"]
+ s.extra_rdoc_files = ["History.txt", "README.txt", "LICENSE.txt"]
+ 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"]
s.homepage = %q{http://caldersphere.rubyforge.org/ci_reporter}
s.rdoc_options = ["--main", "README.txt", "-SHN", "-f", "darkfish"]
s.require_paths = ["lib"]
View
7 lib/ci/reporter/rspec.rb
@@ -43,9 +43,9 @@ def error?
!failure?
end
- def name() exception.class.name end
- def message() exception.message end
- def location() (exception.backtrace || ["No backtrace available"]).join("\n") end
+ def name() @example.metadata[:execution_result][:exception].class.name end
+ def message() @example.metadata[:execution_result][:exception].message end
+ def location() @example.metadata[:execution_result][:exception].backtrace.join("\n") end
end
class RSpec2Failure < RSpecFailure
@@ -164,6 +164,7 @@ def dump_failure(*args)
def dump_summary(*args)
@formatter.dump_summary(*args)
write_report
+ @formatter.dump_failures
end
def dump_pending
View
4 spec/ci/reporter/rspec_spec.rb
@@ -53,6 +53,7 @@
@formatter.should_receive(:dump_failure).once
@formatter.should_receive(:dump_summary).once
@formatter.should_receive(:dump_pending).once
+ @formatter.should_receive(:dump_failures).once
@formatter.should_receive(:close).once
@fmt.start(3)
@@ -76,6 +77,7 @@
@formatter.should_receive(:example_started).once
@formatter.should_receive(:example_passed).once
@formatter.should_receive(:dump_summary)
+ @formatter.should_receive(:dump_failures).once
@report_mgr.should_receive(:write_report)
@fmt.start(2)
@@ -96,6 +98,7 @@
@formatter.should_receive(:example_started).with(example).once
@formatter.should_receive(:example_passed).once
@formatter.should_receive(:dump_summary)
+ @formatter.should_receive(:dump_failures).once
@report_mgr.should_receive(:write_report).and_return do |suite|
suite.testcases.last.name.should == "should do something"
end
@@ -116,6 +119,7 @@
@formatter.should_receive(:example_started).once
@formatter.should_receive(:example_failed).once
@formatter.should_receive(:dump_summary)
+ @formatter.should_receive(:dump_failures).once
@report_mgr.should_receive(:write_report)
@fmt.start(2)
Please sign in to comment.
Something went wrong with that request. Please try again.