Using Mocha to mock an object

Hi,

I have:
  class Order
    def self.export_unshipped_orders
       # returns a string
    end
  end

I want to use Mocha (http://mocha.rubyforge.org/) to fake the return
of Order.export_unshipped_orders. How can I do that?

Thanks,
Joe

Got it:

    Order.stubs(:export_unshipped_orders).returns("what's going on?")

Easy enough!

···

On 10/20/06, Joe Van Dyk <joevandyk@gmail.com> wrote:

Hi,

I have:
  class Order
    def self.export_unshipped_orders
       # returns a string
    end
  end

I want to use Mocha (http://mocha.rubyforge.org/\) to fake the return
of Order.export_unshipped_orders. How can I do that?