1 require File.dirname(__FILE__) + '/spec_helper'
5 it "should be able to call mock()" do
7 mock.should_receive(:poke)
11 it "should fail when expected message not received" do
12 mock = mock("poke me")
13 mock.should_receive(:poke)
16 it "should fail when messages are received out of order" do
17 mock = mock("one two three")
18 mock.should_receive(:one).ordered
19 mock.should_receive(:two).ordered
20 mock.should_receive(:three).ordered
26 it "should get yelled at when sending unexpected messages" do
27 mock = mock("don't talk to me")
28 mock.should_not_receive(:any_message_at_all)
29 mock.any_message_at_all
32 it "should mage eggs and bacon"