1 require File.dirname(__FILE__) + '/test_helper.rb'
4 specify "should return terms from the queue if it is not empty" do
7 port.queue << :foo << :bar
8 port.receive.should == :foo
9 port.receive.should == :bar
10 port.receive.should == nil
13 specify "should read_from_input if the queue gets empty" do
14 port = FakePort.new(:bar)
17 port.receive.should == :foo
18 port.receive.should == :bar
19 port.receive.should == nil
22 specify "should put the terms in skipped at the front of queue when restore_skipped is called" do
23 port = FakePort.new(:baz)
29 port.receive.should == :foo
30 port.receive.should == :bar
31 port.receive.should == :baz
32 port.receive.should == nil