[rspec-users] Stubbed static methods are bleeding over into other specs and making them fail

Peter Schrammel lists at ruby-forum.com
Tue Feb 22 10:19:07 EST 2011


rspec (1.3.1)
rspec-rails (1.3.3)
rails (2.3.3)

Hi,

there was another thread with this topic but with rspec 2.0 so I'll
start a new one for the "old" branch.

I have  a workling class (working with method missing on
"async_<method_name>").

When I stub an async call:

Catalog::PublisherWorker.should_receive(:async_update).with(....)

The old method missing is not available in the following specs:

undefined method `async_update' for Object:Class

So I think the old class behavior is not reset correctly.

Can anybody confirm this? Or even help ?

THX
Peter

-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list