Sha256: 18acd32faa28ee9b6e8961d9493c4cc7c6c673466c3135296c0c5f5595c1af6e

Contents?: true

Size: 1.19 KB

Versions: 215

Compression:

Stored size: 1.19 KB

Contents

require 'spec_helper'

describe ParallelizedSpecs::SpecSummaryLogger do
  let(:output){ OutputLogger.new([]) }
  let(:logger){ ParallelizedSpecs::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

215 entries across 215 versions & 1 rubygems

Version Path
parallelized_specs-0.4.84 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.83 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.82 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.81 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.80 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.79 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.78 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.77 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.76 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.75 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.74 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.73 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.72 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.71 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.70 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.69 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.68 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.67 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.66 spec/parallelized_specs/spec_summary_logger_spec.rb
parallelized_specs-0.4.65 spec/parallelized_specs/spec_summary_logger_spec.rb