Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Letting the collector (fsevents stream) be shut down.

  • Loading branch information...
commit 60feaa01a032d32e496436457ffcc5533b1eeb57 1 parent ec853b9
@ymendel authored
Showing with 20 additions and 0 deletions.
  1. +4 −0 lib/conversion_observer/collector.rb
  2. +16 −0 spec/collector_spec.rb
View
4 lib/conversion_observer/collector.rb
@@ -22,5 +22,9 @@ def stream_callback
def run
stream.run
end
+
+ def shutdown
+ stream.shutdown
+ end
end
end
View
16 spec/collector_spec.rb
@@ -92,4 +92,20 @@
@collector.run
end
end
+
+ it 'should shut down' do
+ @collector.should respond_to(:shutdown)
+ end
+
+ describe 'when shutting down' do
+ before :each do
+ @stream = stub('stream')
+ @collector.stubs(:stream).returns(@stream)
+ end
+
+ it 'should shut down the stream' do
+ @stream.expects(:shutdown)
+ @collector.shutdown
+ end
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.