I have been using ZenTest AutoTest with the previous version of rspec- rails. When I updated to 1.1.5 the autotest just hangs. Are these compatible? Don French
On Mon, Sep 29, 2008 at 9:30 PM, Donald French <dhf0820 at gmail.com> wrote:> I have been using ZenTest AutoTest with the previous version of rspec-rails. > When I updated to 1.1.5 the autotest just hangs. Are these compatible?Use either the installed autospec (not autotest) or script/autospec commands (for rails apps). http://rspec.info/rdoc/files/History_txt.html Cheers, David
Begin forwarded message:> Use either the installed autospec (not autotest) or script/autospec > commands (for rails apps). > > http://rspec.info/rdoc/files/History_txt.html > > Cheers, > DavidHmmm, when I run autospec, all I get is /opt/local/bin/ruby -S spec/spec_helper.rb ... -O spec/spec.opts Then... nothing. Any ideas? Thanks Ashley -- http://www.patchspace.co.uk/ http://aviewfromafar.net/
On Tue, Sep 30, 2008 at 8:02 AM, Ashley Moran <ashley.moran at patchspace.co.uk> wrote:> Begin forwarded message: > >> Use either the installed autospec (not autotest) or script/autospec >> commands (for rails apps). >> >> http://rspec.info/rdoc/files/History_txt.html >> >> Cheers, >> David > > > Hmmm, when I run autospec, all I get is > > /opt/local/bin/ruby -S spec/spec_helper.rb ... -O spec/spec.opts > > Then... nothing. > > Any ideas?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 Cheers, David> Thanks > 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 >
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/ > endThanks! 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/
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 autospecI''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 >