Skip to content

Commit

Permalink
Fix: Hound CI notes
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlira committed Mar 12, 2019
1 parent 69db593 commit 907f3ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/listen/record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def dir_entries(rel_path)

def _sub_tree(rel_path)
tree.each_with_object({}) do |(path, meta), result|
next if !path.start_with?(rel_path)
next unless path.start_with?(rel_path)

if path == rel_path
result.merge!(meta)
Expand Down
8 changes: 4 additions & 4 deletions spec/acceptance/listen_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,16 @@
mkdir_p 'dir1'
mkdir_p 'dir1/subdir1'
mkdir_p 'dir1/subdir1/subdir2'
touch 'dir1/subdir1/file1.rb'
touch 'dir1/subdir1/subdir2/file2.rb'
touch 'dir1/subdir1/file.rb'
touch 'dir1/subdir1/subdir2/file.rb'
example.run
end

it 'listen to the files of a removed directory' do
expected = {
modified: [],
added: [],
removed: ['dir1/subdir1/file1.rb', 'dir1/subdir1/subdir2/file2.rb']
added: [],
removed: %w(dir1/subdir1/file.rb dir1/subdir1/subdir2/file.rb)
}

expect(wrapper.listen do
Expand Down
4 changes: 2 additions & 2 deletions spec/lib/listen/record_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ def record_tree(record)
end

context 'with path/subdir' do
before {record.add_dir('path/subdir')}
it { should eq('subdir' =>{}) }
before { record.add_dir('path/subdir') }
it { should eq('subdir' => {}) }
end
end
end
Expand Down

0 comments on commit 907f3ca

Please sign in to comment.