>Unless RSpec is doing some magic under the hood that I'm not aware of,
>this is expected behavior - you're reassigning the constant value of
>MachineInstance.

>What you really want to do is mock/stub directly on MacineInstance.  e.g.

>MachineInstance.should_receive(:create).and_return @mock_machine

If we did that, would that stub/mock carry over into other spec files run later 
by autospec, which is what we're seeing.
I can see we're changing the definition of MachineInstance in the spec we do 
that in, but should that carry over to later specs?

Marcus



_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to