Skip to content

Commit 5014f70

Browse files
author
kaptron
committed
fix Guard to ignore node_modules dir
1 parent 327aad9 commit 5014f70

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Metrics/BlockLength:
8282
Max: 25
8383
Exclude:
8484
- 'config/routes.rb'
85+
- 'Guardfile'
8586
- 'spec/**/*.rb'
8687

8788
Layout/IndentArray:

Guardfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ guard :rspec, cmd: 'spring rspec' do
2828
require 'guard/rspec/dsl'
2929
dsl = Guard::RSpec::Dsl.new(self)
3030

31-
# Feel free to open issues for suggestions and improvements
31+
# only watch appropriate app directories
32+
directories(%w[app lib config test spec])
33+
.select { |d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist") }
34+
35+
# specifically ignore node_modules (avoid warnings w/ Listen)
36+
ignore(/node_modules/)
3237

3338
# RSpec files
3439
rspec = dsl.rspec

spec/requests/api/v1/notifications_controller_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
let!(:outside_notification) { create(:notification, activity: activity) }
1212
let(:path) { '/api/v1/notifications/' }
1313

14-
before do
15-
16-
end
17-
1814
it 'returns a 200' do
1915
get(path)
2016
expect(response.status).to eq(200)

0 commit comments

Comments
 (0)