Skip to content

Commit

Permalink
fix rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
e2 committed May 31, 2014
1 parent 9131a03 commit 88acb73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/listen/listener.rb
Expand Up @@ -359,7 +359,7 @@ def _adapter_class

# for easier testing without sleep loop
def _process_changes
return if @paused or @queue.empty?
return if @paused || @queue.empty?

changes = []
while !@queue.empty?
Expand Down
9 changes: 6 additions & 3 deletions spec/lib/listen/record_spec.rb
Expand Up @@ -84,7 +84,7 @@

before do
allow(listener).to receive(:directories) { directories }
allow(listener).to receive(:sync).with(:change_pool) { actor}
allow(listener).to receive(:sync).with(:change_pool) { actor }
end

it 're-inits paths' do
Expand All @@ -109,14 +109,17 @@

before do
allow(listener).to receive(:directories) { directories }
allow(listener).to receive(:sync).with(:change_pool) { actor}
allow(listener).to receive(:sync).with(:change_pool) { actor }
end

it 'keeps the build blocking longer' do
record # To avoid initializing record in thread

th = Thread.new do
10.times { sleep 0.05; record.still_building! }
10.times do
sleep 0.05
record.still_building!
end
end

started = Time.now
Expand Down

0 comments on commit 88acb73

Please sign in to comment.