<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -25,6 +25,10 @@ USAGE
     rake test:last
     rake spec:last
 
+TIPS
+====
+ - if `script/spec` is missing, if will use just `spec` for specs (which solves some issues)
+
 TODO
 ====
  - make test:last more clever e.g. lib -&gt; try spec + spec/lib</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -78,11 +78,15 @@ module SingleTest
   def run_test(type, file, test_name=nil)
     case type.to_s
     when 'test' then sh &quot;ruby -Ilib:test #{file} -n /#{test_name}/&quot;
-    when 'spec' then sh &quot;export RAILS_ENV=test ; script/spec -O spec/spec.opts #{file}&quot; + (test_name ? %Q( -e &quot;#{test_name.sub('&quot;',&quot;\\\&quot;&quot;)}&quot;) : '') + (ENV['X'] ? &quot; -X&quot; : &quot;&quot;)
+    when 'spec' then sh &quot;export RAILS_ENV=test ; #{spec_executable} -O spec/spec.opts #{file}&quot; + (test_name ? %Q( -e &quot;#{test_name.sub('&quot;',&quot;\\\&quot;&quot;)}&quot;) : '') + (ENV['X'] ? &quot; -X&quot; : &quot;&quot;)
     else raise &quot;Unknown: #{type}&quot;
     end
   end
 
+  def spec_executable
+    File.exist?(&quot;script/spec&quot;) ? &quot;script/spec&quot; : &quot;spec&quot;
+  end
+
   def last_modified_file(dir, options={})
     Dir[&quot;#{dir}/**/*#{options[:ext]}&quot;].sort_by { |p| File.mtime(p) }.last
   end</diff>
      <filename>lib/single_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>b0ac80663fa87c654b2ac0104ca0165475ab44cf</id>
    </parent>
  </parents>
  <author>
    <name>grosser</name>
    <email>grosser.michael@gmail.com</email>
  </author>
  <url>http://github.com/grosser/single_test/commit/c896a38911022707e66138a2b0bec91e131052c5</url>
  <id>c896a38911022707e66138a2b0bec91e131052c5</id>
  <committed-date>2009-09-22T13:34:59-07:00</committed-date>
  <authored-date>2009-09-22T13:34:59-07:00</authored-date>
  <message>choose spec executable depending on if script/spec is there</message>
  <tree>b84c20920e02243df0b60f213d1fd2a415d6254f</tree>
  <committer>
    <name>grosser</name>
    <email>grosser.michael@gmail.com</email>
  </committer>
</commit>
