[rspec-users] Rails 3, Rspec 2, Autotest

Michael Guterl mguterl at gmail.com
Sun Apr 18 13:09:52 EDT 2010


On Sun, Apr 18, 2010 at 12:52 PM, Michael Guterl <mguterl at gmail.com> wrote:
> On Sun, Apr 18, 2010 at 12:30 PM, Michael Guterl <mguterl at gmail.com> wrote:
>> On Sat, Apr 17, 2010 at 11:10 AM, David Chelimsky <dchelimsky at gmail.com> wrote:
>>> On Apr 17, 2010, at 9:42 AM, Tim Riendeau wrote:
>>>
>>> I am having similar issue getting this working. I am running rails3.beta3
>>> with ruby 1.8.7. I followed http://gist.github.com/365816 and I get the
>>> following:
>>>
>>> loading autotest/rails_rspec2
>>> Autotest style autotest/rails_rspec2 doesn't seem to exist. Aborting.
>>>
>>> I uninstalled and reinstalled the ZenTest & autotest gems with no luck. The
>>> same thing occurs in other rails3 apps.
>>>
>>> Any help would be much appreciated
>>>
>>>
>>> I just modified the gist slightly. It looks like rubygems won't find
>>> rspec-rails-2.0.0.beta.7 if we ask for ">= 2.0.0.beta". Anyhow, if I follow
>>> the setup in http://gist.github.com/365816, it works for me with ruby 1.8.7.
>>>
>> Using 1.9.2-head and following the steps in the updated gist I am
>> seeing the same behavior that Mark is reporting.
>>
>> michaelguterl at carini ~/code/example$ autotest
>> loading autotest/rails
>> style: Rails
>>
>>
>> --------------------------------------------------------------------------------
>>
> This looks to be a bug with autotest and 1.9.2 as I was able to get
> everything working fine with 1.8.7.
>
> From within the project directory in 1.8.7
>
> Autotest.autodiscover # => ["rails", "rspec2"]
>
> from within the project directory in 1.9.2
>
> Autotest.autodiscover # => ["rails"]
>
Digging even further, this happens because in Ruby 1.9.2 the current
directory is not added to $LOAD_PATH which results in
Gem.find_files("autotest/discover") not finding the
autotest/discover.rb in RAILS_ROOT.

I believe this is a bug in autotest and I have filed a report here:
http://rubyforge.org/tracker/index.php?func=detail&aid=28113&group_id=419&atid=1678

Best,
Michael Guterl


More information about the rspec-users mailing list