Sha256: 80c3afaad4b4c2ed9e953aed0de11fc18e849dfd31e81a39523d6a25412c76af
Contents?: true
Size: 1.18 KB
Versions: 15
Compression:
Stored size: 1.18 KB
Contents
require 'spec_helper' describe ParallelSpecs::SpecSummaryLogger do let(:output){ OutputLogger.new([]) } let(:logger){ ParallelSpecs::SpecSummaryLogger.new(output) } # TODO somehow generate a real example with an exception to test this xit "prints failing examples" do logger.example_failed XXX logger.example_failed XXX logger.dump_failures output.output.should == [ "bundle exec rspec ./spec/path/to/example.rb:123 # should do stuff", "bundle exec rspec ./spec/path/to/example.rb:125 # should not do stuff" ] end it "does not print anything for passing examples" do logger.example_passed mock(:location => "/my/spec/foo.rb:123") logger.dump_failures output.output.should == [] logger.dump_summary(1,2,3,4) output.output.should == ["\nFinished in 1 seconds\n", "\e[31m2 examples, 3 failures, 4 pending\e[0m"] end it "does not print anything for pending examples" do logger.example_pending mock(:location => "/my/spec/foo.rb:123") logger.dump_failures output.output.should == [] logger.dump_summary(1,2,3,4) output.output.should == ["\nFinished in 1 seconds\n", "\e[31m2 examples, 3 failures, 4 pending\e[0m"] end end
Version data entries
15 entries across 15 versions & 3 rubygems