Sha256: ede47a9e4a1e9f115912caea1f1fc0632ea1b1c4289024d3344aeeccaaeecf66
Contents?: true
Size: 820 Bytes
Versions: 19
Compression:
Stored size: 820 Bytes
Contents
require "spec_helper" require "teabag/drivers/phantomjs_driver" describe Teabag::Drivers::PhantomjsDriver do describe "#run_specs" do before do Phantomjs.stub(:run) end it "instantiates the formatter" do runner = mock(failure_count: nil) Teabag::Runner.should_receive(:new).and_return(runner) subject.run_specs(:default, "_url_") end it "calls phantomjs.run and logs the results of each line using the formatter" do args = [Teabag::Engine.root.join("lib/teabag/drivers/phantomjs/runner.coffee").to_s, "_url_"] Teabag::Runner.any_instance.should_receive(:process).with("_line_") @block = nil Phantomjs.should_receive(:run).with(*args) { |&b| @block = b } subject.run_specs(:default, "_url_") @block.call("_line_") end end end
Version data entries
19 entries across 19 versions & 1 rubygems