[rspec-users] Setup for autospec for non-rails project

Rick DeNatale rick.denatale at gmail.com
Tue Dec 2 13:27:17 EST 2008


On Tue, Dec 2, 2008 at 1:18 PM, Rick DeNatale <rick.denatale at gmail.com>wrote:

> Okay,
>
> If I add this to my .autospec file
>
> class Autotest::Rspec
>
>   def make_test_cmd(files_to_test)
>     return '' if files_to_test.empty?
>     return "spec #{files_to_test.keys.flatten.join(' ')}
> #{add_options_if_present}"
>   end
> end
>
> It works.
>
> This replaces a method defined in the rspec gem in lib/autotest/rspec.rb
>
>   def make_test_cmd(files_to_test)
>     return '' if files_to_test.empty?
>     return "#{ruby} -S #{files_to_test.keys.flatten.join(' ')}
> #{add_options_if_present}"
>   end
>
>
> I guess I need to file a bug report?!?
>

After investigating github, it looks like a slightly different
fix for this is already in the works.
http://github.com/dchelimsky/rspec/commit/d6029bd91a08ce87ad10c917bfb7b4c75645bf79

although it will only work if it's in the gem code rather than in .autotest
(it finds the spec command file path relative to the source file).

So for the time being, I'll just use my .autotest patch

-- 
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081202/356f9ee5/attachment.html>


More information about the rspec-users mailing list