Hi, I have a project where autospec is not adding new files to it's test list. When I run 'rake spec' it finds and runs the spec files. Wondering if there is a cache file that autospec is using? I've searched for an answer, while I've learned lots of interesting other tidbits - no answer to what might be happening here. thanks for any help
on 2009-11-20 07:14
on 2009-11-20 07:24
On Fri, Nov 20, 2009 at 1:02 AM, Andy Koch <andy.koch@pc-doctor.com> wrote: > > I have a project where autospec is not adding new files to it's test > list. Autotest (which autospec is really just a wrapper around) builds its file list when it initializes. After that its looping is pretty specific. If you want to refresh it with all new changes, you can hit CTRL-C any time and it'll start again from scratch. -- Have Fun, Steve Eley (sfeley@gmail.com) ESCAPE POD - The Science Fiction Podcast Magazine http://www.escapepod.org
on 2009-11-20 16:55
Yes, unfortunately that's the problem I'm experiencing. Ctl-C isn't refreshing to find the new files. I stop completely and restart and still no luck. I've added (for a Rails app) a new controller and helper spec file and they only run if I "spec ..." or "rake spec". autospec (autotest) seems stuck on it's current file list - almost as if it has a file cache somewhere that isn't getting refreshed
on 2009-11-20 18:59
On Fri, Nov 20, 2009 at 7:25 AM, Andy Koch <andy.koch@pc-doctor.com> wrote: > > > Ctl-C isn't refreshing to find the new files. I stop completely and > restart and still no luck. I've added (for a Rails app) a new > controller and helper spec file and they only run if I "spec ..." or > "rake spec". > What are the names and paths to these files? > autospec (autotest) seems stuck on it's current file list - almost as > if it has a file cache somewhere that isn't getting refreshed > RSpec maintains no cache for this. Autotest does maintain a temporary cache (of sorts), but CTRL-C has always worked for me to refresh it.
on 2009-11-20 19:43
Hi David,
I think it's standard directory structure...
andy@hst-26-147 (master)->tree spec/
spec/
|-- controllers
| |-- perforce_logs_controller_spec.rb
| |-- public_controller_spec.rb
| |-- user_sessions_controller_spec.rb
| |-- user_sessions_routing_spec.rb
| `-- users_controller_spec.rb
|-- factories
| |-- branch_options.rb
| |-- module_states.rb
| `-- user.rb
|-- fixtures
| |-- roles.yml
| `-- user_sessions.yml
|-- helpers
| |-- perforce_logs_helper_spec.rb
| |-- public_helper_spec.rb
| |-- user_sessions_helper_spec.rb
| `-- users_helper_spec.rb
|-- models
| |-- branch_option_spec.rb
| `-- role_spec.rb
|-- rcov.opts
|-- spec.opts
|-- spec_helper.rb
`-- views
|-- layouts
| |-- public.html.haml_spec.rb
| `-- public_navigation.html.haml_spec.rb
|-- public
| `-- perforcer_strings.html.haml_spec.rb
`-- user_sessions
`-- new.html.haml_spec.rb
Autospec doesn't run the "perforce_logs...spec.rb" files. As shown
here...
andy@hst-26-147 (master)->autospec
loading autotest/rails_rspec
/opt/local/bin/ruby /opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/bin/
spec --autospec spec/models/role_spec.rb spec/controllers/
public_controller_spec.rb spec/views/layouts/
public_navigation.html.haml_spec.rb spec/helpers/public_helper_spec.rb
spec/views/layouts/public.html.haml_spec.rb spec/controllers/
users_controller_spec.rb spec/controllers/
user_sessions_routing_spec.rb spec/controllers/
user_sessions_controller_spec.rb spec/models/branch_option_spec.rb
spec/helpers/users_helper_spec.rb spec/views/user_sessions/
new.html.haml_spec.rb spec/helpers/user_sessions_helper_spec.rb -O
spec/spec.opts
No server is running
Running specs locally:
....................................................
Finished in 2.200675 seconds
52 examples, 0 failures
I have other Rails apps where Autospec works fine, just not this one.
thanks
on 2009-11-20 19:55
On Fri, Nov 20, 2009 at 1:35 PM, Andy Koch <andy.koch@pc-doctor.com> wrote: > > Autospec doesn't run the "perforce_logs...spec.rb" files. As shown > here... Random theory: try renaming the files temporary to remove the word "log" from the name. I'm wondering if it might be a wildcard matcher somewhere in the chain that overenthusiastically ignores log files. (If so, that's still an annoying glitch that needs to be fixed, but at least you'll have identified it.) You might also try another tool; I haven't tried this one yet -- I intend to -- but it appears to be more configurable: http://github.com/mynyml/watchr/ -- Have Fun, Steve Eley (sfeley@gmail.com) ESCAPE POD - The Science Fiction Podcast Magazine http://www.escapepod.org
on 2009-11-20 21:28
YES!! that was it... [~/gits/perforcer] andy@hst-26-147 (master)->mv spec/controllers/ perforce_logs_controller_spec.rb spec/controllers/ perforce_controller_spec.rb [~/gits/perforcer] andy@hst-26-147 (master)->autospec loading autotest/rails_rspec /opt/local/bin/ruby /opt/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/bin/ spec --autospec spec/models/role_spec.rb spec/controllers/ public_controller_spec.rb spec/views/layouts/ public_navigation.html.haml_spec.rb spec/helpers/public_helper_spec.rb spec/views/layouts/public.html.haml_spec.rb spec/controllers/ users_controller_spec.rb spec/controllers/ user_sessions_routing_spec.rb spec/controllers/ user_sessions_controller_spec.rb spec/models/branch_option_spec.rb spec/controllers/perforce_controller_spec.rb spec/helpers/ users_helper_spec.rb spec/views/user_sessions/new.html.haml_spec.rb spec/helpers/user_sessions_helper_spec.rb -O spec/spec.opts No server is running Running specs locally: ..................................................... Finished in 2.381309 seconds 53 examples, 0 failures OK, that's a gotcha learned, thanks
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.