ThoughtWorks team uses Mocha

Posted by James Mead Tue, 05 Sep 2006 06:35:00 GMT

It’s good to see that a team from my old company has caught the Mocha bug…

Jay Fields describes how his team have been using Mocha to achieve Ruby on Rails Unit Testing in less than 1 second.

Tags , , , , , ,  | 2 comments

Comments

  1. Jay Levitt said about 2 hours later:

    Additionally, RSpec folks have been talking about modularizing their architecture a bit so they can integrate Mocha as well as their own mock scheme. Personally, I’d rather see them simply switch to Mocha, but there are things it doesn’t do yet (ordering, consecutive returns, etc). Check out the thread starting here:

    http://rubyforge.org/pipermail/rspec-devel/2006-September/000610.html

  2. James Mead said about 3 hours later:

    Thanks for the link and the positive comments. Many of the “things it cannot do yet” can be implemented very simply using the existing API and the power of Ruby. e.g. consecutive returns…

        results = [false, true]
        object = stub(:finished? => lambda { results.shift })
        assert_equal false, object.finished?
        assert_equal true, object.finished?  

    I’ve been meaning to add such things to the API, but we’ve been using it at Reevoo for quite a while without feeling an urgent need for them.

Comments are disabled