Sha256: 7d803905b64ba3aa26a7d3803d5acca6f83f27638dfda701e0532b167fc20615
Contents?: true
Size: 1.01 KB
Versions: 4
Compression:
Stored size: 1.01 KB
Contents
require "spec_helper" describe Stairs::Runner do let(:groups) { nil } let(:subject) { described_class.new(groups) } describe "#run!" do let(:script_double) { double("script", run!: true) } before do # Stub things as to not block IO Stairs::InteractiveConfiguration.any_instance.stub :run! Stairs::Script.any_instance.stub :run! Stairs::Script.stub(:new).and_return(script_double) end it "runs the interactive configuration" do Stairs::InteractiveConfiguration.any_instance.should_receive(:run!) subject.run! end it "runs all groups in the setup.rb script" do Stairs::Script.should_receive(:new).with("setup.rb", groups).and_return(script_double) script_double.should_receive(:run!) subject.run! end context "with groups provided" do let(:groups) { [:reset] } it "passes the specified groups to the script" do Stairs::Script.should_receive(:new).with("setup.rb", groups) subject.run! end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
stairs-0.9.0 | spec/lib/stairs/runner_spec.rb |
stairs-0.8.0 | spec/lib/stairs/runner_spec.rb |
stairs-0.7.1 | spec/lib/stairs/runner_spec.rb |
stairs-0.7.0 | spec/lib/stairs/runner_spec.rb |