diff --git a/Guardfile b/Guardfile index 4f6525ee..4de8b369 100644 --- a/Guardfile +++ b/Guardfile @@ -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 diff --git a/Rakefile b/Rakefile index 0fbf3a39..dd24f1df 100644 --- a/Rakefile +++ b/Rakefile @@ -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