I met a problem when I’m using RSpec(1.3.0) on rails.
I installed rspec(1.3.1) and rspec-rails(1.3.3) installed through rails
script/plugin install from github.
I run autospec at $RAILS_ROOT, and if the test goes successful, it’s no
problem, but once I get failed case, it keep running the test repeatedly
and
never stop.
I’m using MacOSX, so I’m configured it connecting to Growl to show the
test
result. Therefore, the failed indication on growl is also shown up
repeatedly until I stop autspec process.
All configuration I did is that I made .autotest file on ~ directory,
and
put the following one line in it.
require ‘autotest/growl’
Also, I installed RSpec using gem intall to my Mac.
I’ve removed my ~/.autotest, but the same problem keep happening.
I originally used this file to configure it to connect to growl, so the
growl has not shown up on my Mac’s screen, but autospec in my console is
keep repeating the test until I make the test success.
I think there is a fuller form which loops over a lot more.
Autotest.add_hook :initialize do |autotest|
%w{.git .svn .hg .DS_Store ._* vendor tmp log doc}.each do |exception|
autotest.add_exception(exception)
end
end
This I found on the Getting started with Autotest. I’m really junior at
this, but, when I get home, I can see if I can’t find my complete
Autotest
file and post it. I just googled a lot to find it… and, I really don’t
know all of the potentially created files for Rails 2 apps. I started
with
Rails 3.
Oh, I see. What I understand from you guys’ suggestion is that there is
a
possibility of autotest picking up updated files unnecessarily somewhere
in
my rails app directory, right?
So, I tried to make the exceptions suit to my environment, and the
following:
Autotest.add_hook :initialize do |at|
at.add_exception %r{^./db}
at.add_exception %r{^./log}
end
made the unnecessary repetition stopped.
You guys gave me the idea of it.
Thank you,
Nori
On Mon, Jan 17, 2011 at 4:00 PM, Edward Monical-Vuylsteke <
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.