lib/spork/runner.rb in spork-0.5.11 vs lib/spork/runner.rb in spork-0.6.0

- old
+ new

@@ -1,8 +1,9 @@ require 'optparse' require 'spork/server' require 'spork/test_framework' +require 'spork/run_strategy' module Spork # This is used by bin/spork. It's wrapped in a class because it's easier to test that way. class Runner attr_reader :test_framework @@ -69,11 +70,12 @@ Spork::Diagnoser.install_hook!(test_framework.entry_point) test_framework.preload Spork::Diagnoser.output_results(@output) return true else - return(false) unless test_framework.preload - Spork::Server.run(:port => @options[:port], :test_framework => test_framework) + run_strategy = Spork::RunStrategy.factory(test_framework) + return(false) unless run_strategy.preload + Spork::Server.run(:port => @options[:port] || test_framework.default_port, :run_strategy => run_strategy) return true end end private