<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,8 +2,7 @@ require 'autotest'
 
 Autotest.add_hook :initialize do |at|
   at.clear_mappings
-  # watch out: Ruby bug (1.8.6):
-  # %r(/) != /\//
+  # watch out for Ruby bug (1.8.6): %r(/) != /\//
   at.add_mapping(%r%^spec/.*_spec.rb$%) { |filename, _|
     filename
   }
@@ -18,6 +17,8 @@ end
 class RspecCommandError &lt; StandardError; end
 
 class Autotest::Rspec &lt; Autotest
+  
+  SPEC_PROGRAM = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'spec'))
 
   def initialize
     super
@@ -36,13 +37,11 @@ class Autotest::Rspec &lt; Autotest
   end
 
   def make_test_cmd(files_to_test)
-    return '' if files_to_test.empty?
-    files_to_test = normalize_files_to_test(files_to_test)
-    spec_program = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'bin', 'spec'))
-    return &quot;#{ruby} #{spec_program} --autospec #{files_to_test.keys.flatten.join(' ')} #{add_options_if_present}&quot;
+    files_to_test.empty? ? '' :
+      &quot;#{ruby} #{SPEC_PROGRAM} --autospec #{normalize(files_to_test).keys.flatten.join(' ')} #{add_options_if_present}&quot;
   end
 
-  def normalize_files_to_test(files_to_test)
+  def normalize(files_to_test)
     files_to_test.keys.inject({}) do |result, filename|
       result[File.expand_path(filename)] = []
       result
@@ -50,6 +49,6 @@ class Autotest::Rspec &lt; Autotest
   end
 
   def add_options_if_present # :nodoc:
-    File.exist?(&quot;spec/spec.opts&quot;) ? &quot;-O spec/spec.opts &quot; : &quot;&quot;
+    File.exist?(&quot;spec/spec.opts&quot;) ? &quot;-O #{File.join('spec','spec.opts')} &quot; : &quot;&quot;
   end
 end</diff>
      <filename>lib/autotest/rspec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -116,7 +116,7 @@ describe Autotest::Rspec do
       ['filename.rb', './filename.rb', File.expand_path('filename.rb')].each do |file|
         @files_to_test[file] = []
       end
-      @rspec_autotest.normalize_files_to_test(@files_to_test).count.should == 1
+      @rspec_autotest.normalize(@files_to_test).count.should == 1
     end
   end
 end</diff>
      <filename>spec/autotest/rspec_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>780233cba5d9877d99f5c7f768fd4ec7cd17406d</id>
    </parent>
  </parents>
  <author>
    <name>David Chelimsky</name>
    <email>dchelimsky@gmail.com</email>
  </author>
  <url>http://github.com/dchelimsky/rspec/commit/4c06fa1762424ac5d39fe3f9667ab6c363d8c681</url>
  <id>4c06fa1762424ac5d39fe3f9667ab6c363d8c681</id>
  <committed-date>2009-10-06T17:25:27-07:00</committed-date>
  <authored-date>2009-10-06T17:25:27-07:00</authored-date>
  <message>fewer temp vars</message>
  <tree>e23073e70362bbc82dce2ae615dd42b132467638</tree>
  <committer>
    <name>David Chelimsky</name>
    <email>dchelimsky@gmail.com</email>
  </committer>
</commit>
