spec/spork/server_spec.rb in timcharper-spork-0.5.8 vs spec/spork/server_spec.rb in timcharper-spork-0.5.9
- old
+ new
@@ -122,7 +122,20 @@
it "returns the result of the run_tests method from the forked child" do
create_helper_file
@fake.stub!(:run_tests).and_return("tests were ran")
@fake.run("test", STDOUT, STDIN).should == "tests were ran"
end
+
+ it "accepts a port" do
+ create_helper_file
+ @fake.class.port = 12345
+ @fake.port.should == 12345
+ end
+
+ it "falls back to a default port" do
+ create_helper_file
+ @fake.class.port = nil
+ @fake.port.should == FakeServer.port
+ end
+
end
end