spec/teabag/runner_spec.rb in teabag-0.3.5 vs spec/teabag/runner_spec.rb in teabag-0.3.6
- old
+ new
@@ -7,17 +7,23 @@
before do
@log = ""
STDOUT.stub(:print) { |s| @log << s }
end
- describe "its constructor" do
+ describe "constructor" do
- it "creates a progress formatter if no other formatter is provided" do
- Teabag::Formatters::XmlFormatter = Class.new
- Teabag.configuration.formatters = "progress, xml"
- expect(subject.formatters[0]).to be_a(Teabag::Formatters::ProgressFormatter)
+ after do
+ Teabag.configuration.formatters = "dot"
+ end
+
+ it "instantiates formatters based on configuration" do
+ Teabag::Formatters::XmlFormatter = Class.new do
+ def initialize(suite_name = :default)
+ end
+ end
+ Teabag.configuration.formatters = "dot, xml"
+ expect(subject.formatters[0]).to be_a(Teabag::Formatters::DotFormatter)
expect(subject.formatters[1]).to be_a(Teabag::Formatters::XmlFormatter)
- Teabag.configuration.formatters = "progress"
end
end
describe "#process" do