[rspec-users] Fwd: ZenTest Autotest and 1.1.5

Ashley Moran ashley.moran at patchspace.co.uk
Tue Sep 30 09:15:00 EDT 2008


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

   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/





More information about the rspec-users mailing list