1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Deduplicate bacon invocation

Surprising how much this thrashed so far.
This commit is contained in:
☈king 2012-12-08 08:08:54 -07:00 committed by rking@sharpsaw.org
parent cbf19cc7a4
commit 6861a36179
2 changed files with 7 additions and 2 deletions

View file

@ -10,7 +10,7 @@ module ::Guard
def run_spec(path)
if File.exists?(path)
cmd = "bundle exec bacon -Ilib/pry/test -Ispec -q #{path}"
cmd = "rake spec run=#{path}"
puts cmd
@success &&= system cmd
puts

View file

@ -48,7 +48,12 @@ task :default => [:test]
desc "Run tests"
task :test do
check_dependencies unless ENV['SKIP_DEP_CHECK']
all_specs = Dir['spec/**/*_spec.rb']
all_specs =
if explicit_list = ENV['run']
explicit_list.split(',')
else
Dir['spec/**/*_spec.rb']
end
all_specs.shuffle! if all_specs.respond_to? :shuffle!
system "bacon -Ispec -rubygems -q #{all_specs.join ' '}"
end