1 require File.dirname(__FILE__) + '/spec_helper'
5 return :original_return
9 describe "A partial mock" do
11 it "should work at the class level" do
12 MockableClass.should_receive(:find).with(1).and_return {:stub_return}
13 MockableClass.find(1).should equal(:stub_return)
16 it "should revert to the original after each spec" do
17 MockableClass.find(1).should equal(:original_return)
20 it "can be mocked w/ ordering" do
21 MockableClass.should_receive(:msg_1).ordered
22 MockableClass.should_receive(:msg_2).ordered
23 MockableClass.should_receive(:msg_3).ordered