diff --git a/spec/support/listener_helper.rb b/spec/support/listener_helper.rb index 03bc21b..85c9d78 100644 --- a/spec/support/listener_helper.rb +++ b/spec/support/listener_helper.rb @@ -8,9 +8,11 @@ private end def record_results + noise = %r|\.sw.$| # don't fail specs due to editor swap files, etc. + @results = [] @listener.on_change do |files| - @results += files + @results += files.reject { |f| f =~ noise } end end