Sha256: f0f59107dbce39c204bc9d26a81e7c38dbaf91f96034206be09c581fb7b0f80f

Contents?: true

Size: 986 Bytes

Versions: 5

Compression:

Stored size: 986 Bytes

Contents

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

module Spec
module Runner
module Formatter
describe "RdocFormatter" do
    before(:each) do
        @io = StringIO.new
        @formatter = RdocFormatter.new(@io)
        @formatter.dry_run = true
    end
    it "should produce no summary" do
        @formatter.dump_summary(nil, nil, nil)
        @io.string.should be_empty
      
    end
    it "should produce nothing on start dump" do
        @formatter.start_dump
        @io.string.should be_empty
      
    end
    it "should push out context" do
        @formatter.add_behaviour("context")
        @io.string.should eql("# context\n")
      
    end
    it "should push out failed spec" do
        @formatter.example_failed("spec", 98, nil)
        @io.string.should eql("# * spec [98 - FAILED]\n")
      
    end
    it "should push out spec" do
        @formatter.example_passed("spec")
        @io.string.should eql("# * spec\n")
      
    end
  
end
end
end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rspec-0.9.1 spec/spec/runner/formatter/rdoc_formatter_spec.rb
rspec-0.9.0 spec/spec/runner/formatter/rdoc_formatter_spec.rb
rspec-0.9.2 spec/spec/runner/formatter/rdoc_formatter_spec.rb
rspec-0.9.3 spec/spec/runner/formatter/rdoc_formatter_spec.rb
rspec-0.9.4 spec/spec/runner/formatter/rdoc_formatter_spec.rb