Sha256: d9262fc4d15e8a01fbe63605564dd12d6349427b7406a09d0f19d67d66316566

Contents?: true

Size: 811 Bytes

Versions: 4

Compression:

Stored size: 811 Bytes

Contents

require File.dirname(__FILE__) + '/../../../spec_helper.rb'

module Spec
  module Runner
    module Formatter
      describe "FailingExamplesFormatter" do
        before(:each) do
          @io = StringIO.new
          @formatter = FailingExamplesFormatter.new(@io)
        end

        it "should add example name for each failure" do
          @formatter.add_behaviour("b 1")
          @formatter.example_failed("e 1", nil, Reporter::Failure.new(nil, RuntimeError.new))
          @formatter.add_behaviour("b 2")
          @formatter.example_failed("e 2", nil, Reporter::Failure.new(nil, RuntimeError.new))
          @formatter.example_failed("e 3", nil, Reporter::Failure.new(nil, RuntimeError.new))
          @io.string.should eql(<<-EOF
b 1 e 1
b 2 e 2
b 2 e 3
EOF
)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
has_finder-0.1.1 spec/rails/vendor/plugins/rspec/spec/spec/runner/formatter/failing_examples_formatter_spec.rb
has_finder-0.1.2 spec/rails/vendor/plugins/rspec/spec/spec/runner/formatter/failing_examples_formatter_spec.rb
has_finder-0.1.3 spec/rails/vendor/plugins/rspec/spec/spec/runner/formatter/failing_examples_formatter_spec.rb
rspec-1.0.5 spec/spec/runner/formatter/failing_examples_formatter_spec.rb