Skip to content

Instantly share code, notes, and snippets.

@jarmo
Created September 25, 2011 21:46
Show Gist options
  • Save jarmo/1241206 to your computer and use it in GitHub Desktop.
Save jarmo/1241206 to your computer and use it in GitHub Desktop.
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