spec/controller_spec.rb in SimControl-0.1.6 vs spec/controller_spec.rb in SimControl-0.1.7

- old
+ new

@@ -53,14 +53,15 @@ end end describe "#simulation" do let(:klass) { double("Klass") } - it "creates a new instance of the given class and passes the hash" do + it "creates a new instance of the given class and passes the hash, and the results directory" do script = "a-script" hash = double("Hash") - instance = SimControl::Controller.new("", "", "", "") - klass.should_receive(:new).with(script, hash) + results_directory = "results/scenario_name" + instance = SimControl::Controller.new("", "", "", results_directory) + klass.should_receive(:new).with(script, results_directory, hash) instance.simulation klass, script, hash end it "allows for the instance to be obtained as #current_simulation" do simulation_instance = double("simulation_instance")