Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Stop propagating events after stop."

This reverts commit 2abcea8.
  • Loading branch information...
commit d2f9b82545b5a0db359c79ae64f4300dbb091109 1 parent af2fba5
@ConradIrwin authored
Showing with 0 additions and 27 deletions.
  1. +0 −1  lib/em-imap/listener.rb
  2. +0 −26 spec/listener_spec.rb
View
1  lib/em-imap/listener.rb
@@ -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
26 spec/listener_spec.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.