Forum: RSpec Insight needed into misbehaving expectations needed

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8e033d0007374b14f6c213ede64d470b?d=identicon&s=25 Kenneth Kalmer (kennethkalmer)
on 2009-05-18 18:09
(Received via mailing list)
Hi everyone

I have a peculiar scenario that I don't know how to debug, or get to the
bottom of, and need some insight.

Environment:

* Rails 2.3.2
* rspec 1.2.6 & rspec-rails 1.2.6 (vendored gems)
* mocha 0.9.5 (vendored)

Scenario:

* I have expectations setup in a before block, as well as in the
examples
themselves.
* Running the suite on it's own, everything runs perfectly and passes
* Running rake spec, the expectations in the examples aren't met, but
the
expectations from the before blocks are (for controller specs and model
specs)
* Running rake spec:controllers, same as above
* Running rake spec:models, *not* the same as above, works exactly as
supposed to

I've got other controllers with almost identical expectation setups that
work no matter how they are run. In my case it seems that one
controller's
specs fail horribly, and it's something I cannot yet trace.

I'm hoping someone can shed some light from experience, or onto the
rspec
internals, so I can dig this out and solve the issue.

I'm in IRC as well, but it seems very much like an idle space at the
moment...

Kind regards
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-05-18 18:30
(Received via mailing list)
On Mon, May 18, 2009 at 10:23 AM, Kenneth Kalmer
<kenneth.kalmer@gmail.com> wrote:
>
> supposed to
This usually indicates that one or more of your examples are leaking
state.

>
> I've got other controllers with almost identical expectation setups that
> work no matter how they are run. In my case it seems that one controller's
> specs fail horribly, and it's something I cannot yet trace.
>
> I'm hoping someone can shed some light from experience, or onto the rspec
> internals, so I can dig this out and solve the issue.
>
> I'm in IRC as well, but it seems very much like an idle space at the
> moment...

I'm in IRC now - don't have too much time to spare but can spare a
couple of minutes if you pop into #rspec on freenode.
This topic is locked and can not be replied to.