From 97c8e8096a0f8f22459f12833b5288af0ff18921 Mon Sep 17 00:00:00 2001 From: Damian Terentiev Date: Sun, 13 Apr 2008 16:08:04 +0400 Subject: [PATCH] Added a small fix to autotest/merb_rspec.rb template spec_commands method could fail to find a spec command. Now it also tries to get the output of `which spec` as a last resort. --- .../merb/templates/autotest/merb_rspec.rb | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/merb-gen/app_generators/merb/templates/autotest/merb_rspec.rb b/merb-gen/app_generators/merb/templates/autotest/merb_rspec.rb index 7bea399..a08b6c4 100644 --- a/merb-gen/app_generators/merb/templates/autotest/merb_rspec.rb +++ b/merb-gen/app_generators/merb/templates/autotest/merb_rspec.rb @@ -168,10 +168,12 @@ class Autotest::MerbRspec < Autotest # # * bin/spec # * default spec bin/loader installed in Rubygems + # * default command executed when you type `spec` def spec_commands [ File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'spec')), - File.join(Config::CONFIG['bindir'], 'spec') + File.join(Config::CONFIG['bindir'], 'spec'), + `which spec`.chomp ] end -- 1.5.4.5