Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (29 sloc) 1.11 KB
# (c) Copyright 2006-2007 Nick Sieger <>
# See the file LICENSE.txt included with the distribution for
# software license details.
require File.dirname(__FILE__) + "/../../spec_helper.rb"
require 'stringio'
describe "The RSpec reporter" do
before(:each) do
@error = mock("error")
@report_mgr = mock("report manager")
@fmt =""), false, false, @report_mgr)
it "should create a test suite with one success and one failure" do
@report_mgr.should_receive(:write_report).and_return do |suite|
suite.testcases.length.should == 2
suite.testcases.first.should_not be_failure
suite.testcases.first.should_not be_error
suite.testcases.last.should be_error
@fmt.add_behaviour("A context")
@fmt.example_started("should pass")
@fmt.example_passed("should pass")
@fmt.example_started("should fail")
@fmt.example_failed("should fail", 1, @error)
@fmt.dump_summary(0.1, 2, 1)
Jump to Line
Something went wrong with that request. Please try again.