[rspec-users] pending tests fail when I switch to mock_with :mocha

Ole Morten Amundsen ole.morten.amundsen at gmail.com
Fri Nov 12 08:23:59 EST 2010


First of all, please direct me into how better to search existing threads in
this mailing list.

Ok to my rspec 2.0.1 mocha 0.9.8 issue:

given a controller test
 before do
    subject.expects(:authenticate).once
  end

  it "should bla bla" do
   pending "PENDING, shouldn't fail?"
end

with
   config.mock_with :rspec
it's ok: pending, but with
   config.mock_with :mocha
if fails!

It expected the authenticate to be called. What do I have to do to make it
compatible?

Reason for using mocha, is
A: I'm used to it
B: I don't know rspec mocks too well, but it notice that these mocks live
across tests, breaking unrelated model specs.

cheers!
oma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20101112/1a5a89f4/attachment.html>


More information about the rspec-users mailing list