1 require File.dirname(__FILE__) + '/../../../spec_helper.rb'
6 describe "RdocFormatter" do
9 @formatter = RdocFormatter.new(@io)
10 @formatter.dry_run = true
12 it "should produce no summary" do
13 @formatter.dump_summary(nil, nil, nil, nil)
14 @io.string.should be_empty
17 it "should produce nothing on start dump" do
19 @io.string.should be_empty
22 it "should push out context" do
23 @formatter.add_behaviour("context")
24 @io.string.should eql("# context\n")
27 it "should push out failed spec" do
28 @formatter.example_failed("spec", 98, nil)
29 @io.string.should eql("# * spec [98 - FAILED]\n")
32 it "should push out spec" do
33 @formatter.example_passed("spec")
34 @io.string.should eql("# * spec\n")
38 it "should push out not implemented spec" do
39 @formatter.example_not_implemented("spec")
40 @io.string.should eql("# * spec [NOT IMPLEMENTED]\n")