public
Fork of dchelimsky/rspec
Description: Behaviour Driven Development framework for Ruby
Homepage: http://rspec.info
Clone URL: git://github.com/raggi/rspec.git
Removed incorrect -S flag on autospec commands. Added explicit spec command for 
ruby to run, guarantee running rspec, even if spec files are very wrong. (closes 
#507 
(http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/507-removal-of-spec-
command-in-autotest-breaks-windows))
raggi (author)
Wed Nov 05 06:22:57 -0800 2008
commit  2538636794e7a27f62065b6a19ddbdc1cec38f5e
tree    5aca6b5b40c2df6bac1c10388c4742f7ea37dc40
parent  7bdda7dfddd7060cecc260101bc4fe578e9dcf7b
...
37
38
39
40
 
 
41
42
43
...
37
38
39
 
40
41
42
43
44
0
@@ -37,7 +37,8 @@ class Autotest::Rspec < Autotest
0
 
0
   def make_test_cmd(files_to_test)
0
     return '' if files_to_test.empty?
0
-    return "#{ruby} -S #{files_to_test.keys.flatten.join(' ')} #{add_options_if_present}"
0
+    spec_program = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'spec'))
0
+    return "#{ruby} #{spec_program} #{files_to_test.keys.flatten.join(' ')} #{add_options_if_present}"
0
   end
0
   
0
   def add_options_if_present # :nodoc:
...
60
61
62
 
63
64
65
...
71
72
73
74
 
75
76
77
...
60
61
62
63
64
65
66
...
72
73
74
 
75
76
77
78
0
@@ -60,6 +60,7 @@ HERE
0
         @rspec_autotest.stub!(:add_options_if_present).and_return "-O spec/spec.opts"
0
       
0
         @ruby = @rspec_autotest.ruby
0
+        @spec_cmd = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'spec'))
0
         @options = @rspec_autotest.add_options_if_present
0
         @files_to_test = {
0
           :spec => ["file_one", "file_two"]
0
@@ -71,7 +72,7 @@ HERE
0
       end
0
     
0
       it "should make the appropriate test command" do
0
-        @rspec_autotest.make_test_cmd(@files_to_test).should == "#{@ruby} -S #{@to_test} #{@options}"
0
+        @rspec_autotest.make_test_cmd(@files_to_test).should == "#{@ruby} #{@spec_cmd} #{@to_test} #{@options}"
0
       end
0
 
0
       it "should return a blank command for no files" do

Comments