Sha256: 55505884b5b8b9cd58199a52c32d9a87b8e7697eabc2dbaa03a30882437cdb92
Contents?: true
Size: 939 Bytes
Versions: 5
Compression:
Stored size: 939 Bytes
Contents
require File.expand_path("../../spec_helper", __FILE__) module CukeForker describe VncListener do let(:server) { mock(VncServer) } let(:pool) { mock(VncServerPool) } let(:worker) { mock(Worker) } let(:listener) { VncListener.new pool } it "fetches a display from the pool and assings it to the worker" do pool.should_receive(:get).and_return(server) worker.should_receive(:vnc=).with server listener.on_worker_starting worker end it "releases the display and removes it from the worker" do worker.should_receive(:vnc).and_return server pool.should_receive(:release).with server worker.should_receive(:vnc=).with(nil) listener.on_worker_finished worker end it "stops the pool when the run finishes" do pool.should_receive(:stop) listener.on_run_finished(true) end end # VncListenerServer end # CukeForker
Version data entries
5 entries across 5 versions & 1 rubygems