Permalink
Browse files

Revert "Stop propagating events after stop."

This reverts commit 2abcea8.
  • Loading branch information...
1 parent af2fba5 commit d2f9b82545b5a0db359c79ae64f4300dbb091109 @ConradIrwin committed Jul 2, 2011
Showing with 0 additions and 27 deletions.
  1. +0 −1 lib/em-imap/listener.rb
  2. +0 −26 spec/listener_spec.rb
View
@@ -92,7 +92,6 @@ module ListeningDeferrable
# Register a block to be called when receive_event is called.
def listen(&block)
listeners << block
- stopback{ |*args| listeners.delete block }
self
end
View
@@ -54,32 +54,6 @@
a.should == [2]
end
- it "should not propagate events after stopped" do
- a = []
-
- listener = EM::IMAP::Listener.new.listen do |event|
- a << event
- end
-
- listener.receive_event 1
- listener.stop
- listener.receive_event 2
- a.should == [1]
- end
-
- it "should continue propagating events started before stopped" do
- a = []
- listener = EM::IMAP::Listener.new.listen do |event|
- listener.stop
- end.listen do |event|
- a << event
- end
-
- listener.receive_event 1
- listener.receive_event 2
- a.should == [1]
- end
-
describe "transform" do
before :each do
@bottom = EM::IMAP::Listener.new

0 comments on commit d2f9b82

Please sign in to comment.