[rspec-users] Fwd: ZenTest Autotest and 1.1.5

David Chelimsky dchelimsky at gmail.com
Tue Sep 30 10:10:39 EDT 2008


On Tue, Sep 30, 2008 at 8:15 AM, Ashley Moran
<ashley.moran at patchspace.co.uk> wrote:
>
> On 30 Sep 2008, at 14:06, David Chelimsky wrote:
>
>> I just noticed that too on a new project. It's the spec_helper that's
>> causing the trouble, so it needs to be ignored. Put this in a
>> .autotest file at the root of your project:
>>
>> Autotest.add_hook :initialize do |at|
>>  at.add_exception /spec\/spec_helper\.rb/
>> end
>
> Thanks!
>
> Just out of interest, why does that fix it?
>
> Here's my spec_helper.rb:
>
>  require 'rubygems'
>  require 'spec' # only added since using autospec

I've always included "require 'spec'" because it lets me use the ruby
command or rdebug on a specific spec file.

I just temporarily disabled the autospec mechanism and ran autotest
directly and the same project had the same problem if I didn't have
'spec/spec_helper.rb' set as an exception in .autotest. So whatever
the problem is, I don't think it is introduced by wrapping autotest in
autospec. Not really sure what's up w/ this.

Anybody else have this experience?

>
>  lib_path = File.expand_path(File.join(File.dirname(__FILE__), '../lib'))
>  $:.unshift(lib_path) unless $:.include?(lib_path)
>
>  require 'followme'
>
>  module InMemoryDatabase
>    def setup_in_memory_database
>      DataMapper.setup(:default, "sqlite3::memory:")
>      FollowMe::Database::Migrator.reset_database!
>    end
>  end
>
> Ashley
>
>
> --
> http://www.patchspace.co.uk/
> http://aviewfromafar.net/
>
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list