Upgraded Rails and RSpec
[monkeycharger.git] / vendor / plugins / rspec / spec / spec / runner / formatter / rdoc_formatter_spec.rb
blobefb17fef8239c43e6d14e4421ff7caeb8c1b3000
1 require File.dirname(__FILE__) + '/../../../spec_helper.rb'
3 module Spec
4 module Runner
5 module Formatter
6 describe "RdocFormatter" do
7     before(:each) do
8         @io = StringIO.new
9         @formatter = RdocFormatter.new(@io)
10         @formatter.dry_run = true
11     end
12     it "should produce no summary" do
13         @formatter.dump_summary(nil, nil, nil, nil)
14         @io.string.should be_empty
15       
16     end
17     it "should produce nothing on start dump" do
18         @formatter.start_dump
19         @io.string.should be_empty
20       
21     end
22     it "should push out context" do
23         @formatter.add_behaviour("context")
24         @io.string.should eql("# context\n")
25       
26     end
27     it "should push out failed spec" do
28         @formatter.example_failed("spec", 98, nil)
29         @io.string.should eql("# * spec [98 - FAILED]\n")
30       
31     end
32     it "should push out spec" do
33         @formatter.example_passed("spec")
34         @io.string.should eql("# * spec\n")
35       
36     end
38     it "should push out not implemented spec" do
39         @formatter.example_not_implemented("spec")
40         @io.string.should eql("# * spec [NOT IMPLEMENTED]\n")      
41     end
42   
43 end
44 end
45 end
46 end