Sha256: fe58980c7ceb1731885c132b1998f5d56acb26555da474acd5944a0fbcbdebb7

Contents?: true

Size: 736 Bytes

Versions: 16

Compression:

Stored size: 736 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'
require 'mspec/runner/formatters/summary'
require 'mspec/runner/example'

describe SummaryFormatter, "#after" do
  before :each do
    $stdout = @out = IOStub.new
    @formatter = SummaryFormatter.new
    @formatter.register
    context = ContextState.new "describe"
    @state = ExampleState.new(context, "it")
  end

  after :each do
    $stdout = STDOUT
  end

  it "does not print anything" do
    exc = ExceptionState.new @state, nil, SpecExpectationNotMetError.new("disappointing")
    @formatter.exception exc
    exc = ExceptionState.new @state, nil, MSpecExampleError.new("painful")
    @formatter.exception exc
    @formatter.after(@state)
    @out.should == ""
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
mspec-1.9.1 spec/runner/formatters/summary_spec.rb
mspec-1.9.0 spec/runner/formatters/summary_spec.rb
mspec-1.8.0 spec/runner/formatters/summary_spec.rb
mspec-1.7.0 spec/runner/formatters/summary_spec.rb
mspec-1.6.0 spec/runner/formatters/summary_spec.rb
mspec-1.5.21 spec/runner/formatters/summary_spec.rb
mspec-1.5.20 spec/runner/formatters/summary_spec.rb
mspec-1.5.19 spec/runner/formatters/summary_spec.rb
mspec-1.5.18 spec/runner/formatters/summary_spec.rb
mspec-1.5.17 spec/runner/formatters/summary_spec.rb
mspec-1.5.16 spec/runner/formatters/summary_spec.rb
mspec-1.5.15 spec/runner/formatters/summary_spec.rb
mspec-1.5.14 spec/runner/formatters/summary_spec.rb
mspec-1.5.13 spec/runner/formatters/summary_spec.rb
mspec-1.5.11 spec/runner/formatters/summary_spec.rb
mspec-1.5.12 spec/runner/formatters/summary_spec.rb