<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -114,11 +114,72 @@ describe &quot;A mock object&quot; do
       end.and_return(:that)
     }.should.raise(Facon::MockExpectationError).message.should == 'Ambiguous return expectation'
   end
-end
 
+  it &quot;should pass when receiving a message the expected number of times&quot; do
+    @mock.should_receive(:message).times(3)
 
+    3.times do
+      @mock.message
+    end
+
+    verify_mock
+  end
+
+  it &quot;should raise a MockExpectationError when receiving a message &lt; expected number of times&quot; do
+    @mock.should_receive(:message).times(3)
+
+    1.times do
+      @mock.message
+    end
+
+    lambda { @mock.spec_verify }.should.raise(Facon::MockExpectationError).message.should == &quot;Mock 'test mock' expected :message with (any args) 3 times, but received it 1 time&quot;
+  end
+
+  it &quot;should raise a MockExpectationError when receiving a message &gt; expected number of times&quot; do
+    @mock.should_receive(:message).times(3)
+
+    5.times do
+      @mock.message
+    end
+
+    lambda { @mock.spec_verify }.should.raise(Facon::MockExpectationError).message.should == &quot;Mock 'test mock' expected :message with (any args) 3 times, but received it 5 times&quot;
+  end
+
+  it &quot;should pass when receiving a message once as expected&quot; do
+    @mock.should.receive(:message).once
 
+    @mock.message
 
+    verify_mock
+  end
+
+  it &quot;should raise a MockExpectationError when never receiving a message but expecting it once&quot; do
+    @mock.should.receive(:message).once
+
+    lambda { @mock.spec_verify }.should.raise(Facon::MockExpectationError).message.should == &quot;Mock 'test mock' expected :message with (any args) 1 time, but received it 0 times&quot;
+  end
+
+  it &quot;should raise a MockExpectationError when receiving a message more than once but expecting it once&quot; do
+    @mock.should.receive(:message).once
 
+    2.times do
+      @mock.message
+    end
 
+    lambda { @mock.spec_verify }.should.raise(Facon::MockExpectationError).message.should == &quot;Mock 'test mock' expected :message with (any args) 1 time, but received it 2 times&quot;
+  end
 
+  it &quot;should pass when never receiving a message as expected&quot; do
+    @mock.should.receive(:message).never
+
+    verify_mock
+  end
+
+  it &quot;should raise a MockExpectationError when receiving a message but never expecting it&quot; do
+    @mock.should.receive(:message).never
+
+    @mock.message
+
+    lambda { @mock.spec_verify }.should.raise(Facon::MockExpectationError).message.should == &quot;Mock 'test mock' expected :message with (any args) 0 times, but received it 1 time&quot;
+  end
+end
\ No newline at end of file</diff>
      <filename>spec/expectation_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ce3258f0216d4087e96d4c8921bf0063a43e519b</id>
    </parent>
  </parents>
  <author>
    <name>Cheah Chu Yeow</name>
    <email>chuyeow@gmail.com</email>
  </author>
  <url>http://github.com/chuyeow/facon/commit/3c4a596676cc5e102576dd65dca292dc36f4508f</url>
  <id>3c4a596676cc5e102576dd65dca292dc36f4508f</id>
  <committed-date>2008-12-04T23:23:01-08:00</committed-date>
  <authored-date>2008-12-04T23:23:01-08:00</authored-date>
  <message>Add specs for #times, #once and #never expectations.</message>
  <tree>5a37c30184fb9f7fd84953dfe36bcbd9ee13242b</tree>
  <committer>
    <name>Cheah Chu Yeow</name>
    <email>chuyeow@gmail.com</email>
  </committer>
</commit>
