Skip to content

Commit

Permalink
Merge pull request #7 from keithpitty/fix-deprecation
Browse files Browse the repository at this point in the history
Fix deprecation
  • Loading branch information
keithpitty committed Feb 24, 2017
2 parents fda182b + b320a71 commit ba47545
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/guard/konacha-rails/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy/config/boot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
6 changes: 3 additions & 3 deletions spec/guard/konacha-rails/rails/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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')

Expand Down

0 comments on commit ba47545

Please sign in to comment.