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/



_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to