diff --git a/spec/lib/listen/adapter/linux_spec.rb b/spec/lib/listen/adapter/linux_spec.rb index d87b65ff..283f4212 100644 --- a/spec/lib/listen/adapter/linux_spec.rb +++ b/spec/lib/listen/adapter/linux_spec.rb @@ -26,6 +26,10 @@ # TODO: fix other adapters too! subject { described_class.new(config) } + after do + subject.stop + end + describe 'watch events' do let(:directories) { [Pathname.pwd] } let(:adapter_options) { {} } @@ -55,6 +59,7 @@ before do fake_worker = double(:fake_worker_for_inotify_limit_message) allow(fake_worker).to receive(:watch).and_raise(Errno::ENOSPC) + allow(fake_worker).to receive(:close) fake_notifier = double(:fake_notifier, new: fake_worker) stub_const('INotify::Notifier', fake_notifier)