spec/uv/tcp_spec.rb in uvrb-0.1.4 vs spec/uv/tcp_spec.rb in uvrb-0.2.0
- old
+ new
@@ -7,9 +7,19 @@
subject { UV::TCP.new(loop, pointer) }
it_behaves_like 'a handle'
it_behaves_like 'a stream'
+ describe "#open" do
+ let(:fd) { 4 }
+
+ it "calls UV.tcp_open" do
+ UV.should_receive(:tcp_open).with(pointer, fd)
+
+ subject.open(fd)
+ end
+ end
+
describe "#bind" do
let(:ip_addr) { double() }
let(:port) { 0 }
context "ipv4" do
\ No newline at end of file