diff --git a/lib/guard/konacha-rails/runner.rb b/lib/guard/konacha-rails/runner.rb index 6d34a8e..12aebeb 100644 --- a/lib/guard/konacha-rails/runner.rb +++ b/lib/guard/konacha-rails/runner.rb @@ -36,7 +36,7 @@ def run(paths = ['']) formatter.reset paths.each do |path| - if path.empty? or File.exists? real_path path + if path.empty? or File.exist? real_path path UI.info "Guard::KonachaRails running #{specs_description(path)}" runner.run konacha_path(path) end diff --git a/spec/dummy/config/boot.rb b/spec/dummy/config/boot.rb index e6186ea..96ae890 100644 --- a/spec/dummy/config/boot.rb +++ b/spec/dummy/config/boot.rb @@ -3,4 +3,4 @@ # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__) -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) +require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE']) diff --git a/spec/guard/konacha-rails/rails/runner_spec.rb b/spec/guard/konacha-rails/rails/runner_spec.rb index 0779415..d29feeb 100644 --- a/spec/guard/konacha-rails/rails/runner_spec.rb +++ b/spec/guard/konacha-rails/rails/runner_spec.rb @@ -50,7 +50,7 @@ end it 'should run each path through runner and format results' do - allow(File).to receive(:exists?) { true } + allow(File).to receive(:exist?) { true } allow(runner).to receive(:formatter) { konacha_formatter } expect(konacha_formatter).to receive(:reset) expect(konacha_runner).to receive(:run).with('/1') @@ -61,8 +61,8 @@ end it 'should run each path with a valid extension' do - expect(File).to receive(:exists?).with(::Rails.root.join('spec/javascripts/1.js').to_s).and_return(true) - expect(File).to receive(:exists?).with(::Rails.root.join('spec/javascripts/foo/bar.js.coffee').to_s).and_return(true) + expect(File).to receive(:exist?).with(::Rails.root.join('spec/javascripts/1.js').to_s).and_return(true) + expect(File).to receive(:exist?).with(::Rails.root.join('spec/javascripts/foo/bar.js.coffee').to_s).and_return(true) expect(konacha_runner).to receive(:run).with('/1') expect(konacha_runner).to receive(:run).with('/foo/bar')