spec/cukeforker/runner_spec.rb in cukeforker-0.1.2 vs spec/cukeforker/runner_spec.rb in cukeforker-0.1.3
- old
+ new
@@ -53,9 +53,20 @@
RecordingVncListener.should_receive(:new).with(mock_vnc_listener).and_return(mock(:update => nil))
Runner.create([], :max => 2, :vnc => true, :record => true)
end
+ it "sets up VNC recording if :record => Hash" do
+ mock_pool = mock(VncTools::ServerPool, :add_observer => nil)
+ VncTools::ServerPool.should_receive(:new).with(2).and_return mock_pool
+
+ mock_vnc_listener = mock(:update => nil)
+ VncListener.should_receive(:new).with(mock_pool).and_return(mock_vnc_listener)
+ RecordingVncListener.should_receive(:new).with(mock_vnc_listener, :codec => "flv").and_return(mock(:update => nil))
+
+ Runner.create([], :max => 2, :vnc => true, :record => {:codec => "flv"})
+ end
+
it "creates and runs a new runner" do
r = mock(Runner)
Runner.should_receive(:create).with(%w[a b], {}).and_return(r)
r.should_receive(:run)