Created
September 25, 2011 21:46
-
-
Save jarmo/1241206 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "runs specs in a loop" do | |
test_framework = double('TestFramework') | |
test_framework.should_receive(:preload) | |
test_framework.should_receive(:reset) | |
test_framework.should_not_receive(:additional_options=) | |
test_framework.should_receive(:run_tests).with(["some_specs"], STDERR, STDOUT) | |
test_framework.should_receive(:options_str).with(["some_specs"], nil).and_return("some_specs") | |
Readline.should_receive(:readline).with("> 'some_specs' or: ").and_return(" \n") | |
Spork.should_receive(:exec_each_run) | |
Spork.should_receive(:exec_after_each_run) | |
start_running = true | |
Spork.stub(:using_spork?) {start_running = !start_running} | |
Spork::RunStrategy::LocalProcess.new(test_framework).run(["some_specs"], STDERR, STDOUT) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment