.

Mocha |

Mocha

Mocha is a library for mocking and stubbing within tests using a syntax like that of JMock and SchMock.

Woohoo! - I finally found a mock tool that look like it can actually handle mocking out ActiveRecord classes on the fly! Truth be told, I haven’t had a chance to put this into production, but I hope to shortly.

I was incredibly frustrated with the way Rails handles mocks precisely because it doesn’t handle ActiveRecord mocking very well. Plus it handles both stubbing and mocks - with expectations. I may have finally found in Ruby what I had in PHP - I missed SimpleTest - it’s good to have a replacement.

One Response to 'Mocha'
  1. James Mead:

    I’m glad you like the look of Mocha. It should do what you want - that’s exactly what we’re using it for. Let me know if you run into any problems with it - feedback is always welcome.

Leave a Reply

Moderation Active: Old stuff here... Therefore your comment on this post will be moderated (i.e. don't submit twice !)

    Categories
    Archives

    .