The Artima Developer Community
Sponsored Link

Java Buzz Forum
Mocha - an new twist on mocking in Ruby

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
News Manager

Posts: 47623
Nickname: newsman
Registered: Apr, 2003

News Manager is the force behind the news at Artima.com.
Mocha - an new twist on mocking in Ruby Posted: Sep 2, 2006 5:22 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by News Manager.
Original Post: Mocha - an new twist on mocking in Ruby
Feed Title: testdriven.com
Feed URL: http://feeds.feedburner.com/testdrivennewslinks?news=10&links=10
Feed Description: Your test-driven development community
Latest Java Buzz Posts
Latest Java Buzz Posts by News Manager
Latest Posts From testdriven.com

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

The main difference between this mocking library and others like FlexMock and RSpec is that it allows you to mock and stub methods on real (non-mock) classes and instances.

You can for example stub ActiveRecord instance methods like :create, :save, :destroy and even class methods like :find to avoid hitting the database in unit tests. There are more examples here.

Read: Mocha - an new twist on mocking in Ruby

Topic: Open source Java licence to guarantee disappointment Previous Topic   Next Topic Topic: Why marketing should make the user manuals!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use