# \[rspec-autotest\] Autotest is missing some of my specs

**URL:** <https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520>\
**Category:** RSpec\
**Created:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520 "2010-09-06T16:39:56Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [September 6, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520/1 "2010-09-06T16:39:56Z")

</div>

Any idea why autotest would miss some of my tests? I run autotest and  
everything passes, but rake spec results in 2 failures. The 2  
failures are from the model spec that is not being included when run  
in autotest.

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [September 6, 2010, 4:44pm UTC](https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520/2 "2010-09-06T16:44:08Z")

</div>

On Sep 3, 2010, at 6:02 PM, ericindc wrote:

> Any idea why autotest would miss some of my tests? I run autotest and  
> everything passes, but rake spec results in 2 failures. The 2  
> failures are from the model spec that is not being included when run  
> in autotest.

Are you sure that the model spec is excluded from autotest rather than  
it’s just passing?

Also - versions? rspec, rails, ruby, os?

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [September 6, 2010, 4:44pm UTC](https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520/3 "2010-09-06T16:44:09Z")

</div>

On Sep 3, 7:04 pm, David C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Sep 3, 2010, at 6:02 PM, ericindc wrote:
> 
> > Any idea why autotest would miss some of my tests? I run autotest and  
> > everything passes, but rake spec results in 2 failures. The 2  
> > failures are from the model spec that is not being included when run  
> > in autotest.
> 
> Are you sure that the model spec is excluded from autotest rather than it’s just passing?
> 
> Also - versions? rspec, rails, ruby, os?

I also verified in the autotest output that the model spec is not  
included. Not sure if there are others.

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [September 6, 2010, 4:44pm UTC](https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520/4 "2010-09-06T16:44:10Z")

</div>

On Sep 3, 2010, at 6:07 PM, ericindc wrote:

> On Sep 3, 7:04 pm, David C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > On Sep 3, 2010, at 6:02 PM, ericindc wrote:
> > 
> > > Any idea why autotest would miss some of my tests? I run autotest and  
> > > everything passes, but rake spec results in 2 failures. The 2  
> > > failures are from the model spec that is not being included when run  
> > > in autotest.
> > 
> > Are you sure that the model spec is excluded from autotest rather than it’s just passing?
> > 
> > Also - versions? rspec, rails, ruby, os?
> 
> I also verified in the autotest output that the model spec is not  
> included. Not sure if there are others.

Versions?

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [September 6, 2010, 4:52pm UTC](https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520/5 "2010-09-06T16:52:23Z")

</div>

On Sep 3, 7:09 pm, David C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Sep 3, 2010, at 6:07 PM, ericindc wrote:
> 
> > On Sep 3, 7:04 pm, David C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > 
> > > On Sep 3, 2010, at 6:02 PM, ericindc wrote:
> 
> > > > Any idea why autotest would miss some of my tests? I run autotest and  
> > > > everything passes, but rake spec results in 2 failures. The 2  
> > > > failures are from the model spec that is not being included when run  
> > > > in autotest.
> 
> > > Are you sure that the model spec is excluded from autotest rather than it’s just passing?
> 
> > > Also - versions? rspec, rails, ruby, os?
> 
> > I also verified in the autotest output that the model spec is not  
> > included. Not sure if there are others.
> 
> Versions?

I purposefully broke the test and everything passes. Running rake  
spec, however, caught the error. I am running a Rails 3 app on OS X  
and RVM 1.8.7-p302 and the the following:

rspec (2.0.0.beta.20)  
rspec-core (2.0.0.beta.20)  
rspec-expectations (2.0.0.beta.20)  
rspec-mocks (2.0.0.beta.20)  
rspec-rails (2.0.0.beta.20)  
autotest (4.3.2)  
autotest-fsevent (0.2.3)  
autotest-growl (0.2.5)  
autotest-rails (4.1.0)

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [September 6, 2010, 4:52pm UTC](https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520/6 "2010-09-06T16:52:22Z")

</div>

I purposefully broke the test and everything passes. Running rake  
spec, however, caught the error. I am running a Rails 3 app on OS X  
and RVM 1.8.7-p302 and the the following:

rspec (2.0.0.beta.20)  
rspec-core (2.0.0.beta.20)  
rspec-expectations (2.0.0.beta.20)  
rspec-mocks (2.0.0.beta.20)  
rspec-rails (2.0.0.beta.20)  
autotest (4.3.2)  
autotest-fsevent (0.2.3)  
autotest-growl (0.2.5)  
autotest-rails (4.1.0)

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [September 7, 2010, 9:43am UTC](https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520/7 "2010-09-07T09:43:49Z")

</div>

On Sep 3, 9:37 pm, David C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > > > > > > failures are from the model spec that is not being included when run
> 
> > > > > autotest-fsevent (0.2.3)  
> > > > > Are the names perfectly aligned with the specs? i.e. app/models/thing.rb and spec/models/thing\_spec.rb? By default, autotest requires this mapping, though it can be customized if you have a need.
> 
> > Yes, and I don’t see any mention of the model in the “No tests  
> > match…” output from autotest.
> 
> Just noticed your post a few back with the versions - try removing autotest-rails from your Gemfile and make sure you’re running autotest with bundle exec.

Hrm…I’m not sure what’s going on. I already removed autotest-rails,  
etc. so that I only have:

$ gem list | grep -i test  
autotest (4.3.2)  
autotest-growl (0.2.5)  
rack-test (0.5.4)  
ZenTest (4.4.0)

I did notice that it does not appear to be running through bundle  
exec:

/Users/Eric/.rvm/rubies/ruby-1.8.7-p302/bin/ruby -rrubygems

Is something misconfigured on my end?

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [September 7, 2010, 9:44am UTC](https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520/8 "2010-09-07T09:44:25Z")

</div>

On Sep 3, 2010, at 8:12 PM, ericindc wrote:

> > > > > > > > failures are from the model spec that is not being included when run
> > 
> > > > autotest-fsevent (0.2.3)  
> > > > Are the names perfectly aligned with the specs? i.e. app/models/thing.rb and spec/models/thing\_spec.rb? By default, autotest requires this mapping, though it can be customized if you have a need.
> 
> Yes, and I don’t see any mention of the model in the “No tests  
> match…” output from autotest.

Just noticed your post a few back with the versions - try removing  
autotest-rails from your Gemfile and make sure you’re running autotest  
with bundle exec.

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [September 7, 2010, 9:44am UTC](https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520/9 "2010-09-07T09:44:25Z")

</div>

On Sep 3, 8:34 pm, David C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > > > Are you sure that the model spec is excluded from autotest rather than it’s just passing?  
> > > > > > and RVM 1.8.7-p302 and the the following:  
> > > > > > rspec-users mailing list  
> > > > > > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)://rubyforge.org/mailman/listinfo/rspec-users
> 
> > I also just noticed that renaming the file to something random causes  
> > autotest to pick it up. It blows up because the corresponding model  
> > does not exist. Naming it back to it’s original causes it to miss  
> > again.
> 
> Are the names perfectly aligned with the specs? i.e. app/models/thing.rb and spec/models/thing\_spec.rb? By default, autotest requires this mapping, though it can be customized if you have a need.

Yes, and I don’t see any mention of the model in the “No tests  
match…” output from autotest.

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [September 7, 2010, 9:44am UTC](https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520/10 "2010-09-07T09:44:26Z")

</div>

On Sep 3, 2010, at 10:56 PM, ericindc wrote:

> > > > > > > > included. Not sure if there are others.  
> > > > > > > > rspec-mocks (2.0.0.beta.20)  
> > > > > > > > does not exist. Naming it back to it’s original causes it to miss  
> > > > > > > > etc. so that I only have:
> 
> /Users/Eric/.rvm/rubies/ruby-1.8.7-p302/bin/ruby -rrubygems
> 
> Is something misconfigured on my end?

Nope - wasn’t handling bundler. Is now:

> <https://github.com/rspec/rspec-core/commit/976b935bde657aebf6f5f7dbb26d6d4e29cc1ac1>

Try setting up your gemfile per Living on edge on  
[GitHub - rspec/rspec-rails: RSpec for Rails 7+ · GitHub](http://github.com/rspec/rspec-rails). Don’t know if it’ll help, but it’s  
probably worth trying.

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [September 7, 2010, 9:44am UTC](https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520/11 "2010-09-07T09:44:26Z")

</div>

On Sep 3, 2010, at 6:42 PM, ericindc wrote:

> > > > > Also - versions? rspec, rails, ruby, os?  
> > > > > rspec (2.0.0.beta.20)
> 
> I also just noticed that renaming the file to something random causes  
> autotest to pick it up. It blows up because the corresponding model  
> does not exist. Naming it back to it’s original causes it to miss  
> again.

Are the names perfectly aligned with the specs? i.e. app/models/thing.rb  
and spec/models/thing\_spec.rb? By default, autotest requires this  
mapping, though it can be customized if you have a need.

---

<div class="post-metadata">

**Author:** ![snowbird122](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Post date:** [September 7, 2010, 9:44am UTC](https://www.ruby-forum.com/t/rspec-autotest-autotest-is-missing-some-of-my-specs/194520/12 "2010-09-07T09:44:26Z")

</div>

On Sep 4, 10:42 am, David C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > > > > > > included. Not sure if there are others.  
> > > > > > > > > rspec-mocks (2.0.0.beta.20)  
> > > > > > > > > does not exist. Naming it back to it’s original causes it to miss  
> > > > > > > > > etc. so that I only have:  
> > > > > > > > > /Users/Eric/.rvm/rubies/ruby-1.8.7-p302/bin/ruby -rrubygems
> 
> > Is something misconfigured on my end?
> 
> Nope - wasn’t handling bundler. Is now:[Run autotest with 'bundle exec' if there is a Gemfile present. · rspec/rspec-core@976b935 · GitHub](http://github.com/rspec/rspec-core/commit/976b935bde657aebf6f5f7dbb26)…
> 
> Try setting up your gemfile per Living on edge onhttp://github.com/rspec/rspec-rails. Don’t know if it’ll help, but it’s probably worth trying.

No luck. Even with living on the edge, it’s still not running under  
bundler (could it be something with RVM) and I get 144 tests with  
autotest and 151 with rake spec.
