This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

modify specs

  • Loading branch information...
1 parent 3115ebf commit 65accf852ceab3b5bafd1adbc8eebf19343af51a Chuck Remes committed May 3, 2011
Showing with 25 additions and 0 deletions.
  1. +25 −0 spec/reactor_spec.rb
View
@@ -0,0 +1,25 @@
+$: << "." # added for ruby 1.9.2 compatibilty; it doesn't include the current directory on the load path anymore
+
+require File.join(File.dirname(__FILE__), %w[spec_helper])
+
+module ZM
+
+ describe Reactor do
+
+
+ context "when closing sockets" do
+ let(:reactor) { Reactor.new(:test) }
+
+ it "should return false when the given socket is nil" do
+ reactor.close_socket(nil).should be_false
+ end
+
+ it "should return true when the given socket is successfully closed and deleted" do
+ sock = reactor.req_socket(FakeHandler.new)
+
+ reactor.close_socket(sock).should be_true
+ end
+ end
+ end # describe Reactor
+
+end # module ZM

0 comments on commit 65accf8

Please sign in to comment.