Skip to content

Commit

Permalink
- corrections to some inaccurate text
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamcarlyle committed Apr 25, 2004
1 parent ffd476d commit 0ba5a2e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions doc/overview.html
Expand Up @@ -51,7 +51,7 @@ <h2 id="CreatingMocks">Creating mocks</h2>
gallery.render()
</pre>

After the test's normal assertions have been made, an assertion on the mocks' expectations is made.
After the test's normal assertions have been made, an assertion that the mock's expectations have been satisfied should be made.

<pre>
mock.verify()
Expand All @@ -67,7 +67,7 @@ <h2 id="ArgumentExpectations">Argument expectations</h2>
mock.expects(pmock.once()).render(pmock.eq(640), pmock.eq(480))
</pre>

The arguments to the expectation's mocked method are constraint objects which are evaluated on the actual arguments when a call is made to the mock object. If an argument doesn't satisfy its constraint then an exception is raised.
The arguments to the expectation's mocked method are constraint objects which are evaluated on the actual arguments when a call is made to the mock object. If an argument doesn't satisfy its constraint then the expectation remains unsatisfied.

<pre>
mock.expects(pmock.once()).render(brush=pmock.same(print.BIG_BRUSH))
Expand Down Expand Up @@ -100,8 +100,6 @@ <h2 id="CallOrderExpectations">Call order expectations</h2>
mock.expects(pmock.once()).render().after("invalidate")
</pre>

If the calls are made out of order then an exception is raised.

<p>An explicit label can be set for an expectation and used in the <code>after</code> method instead of using the method name.

<pre>
Expand Down Expand Up @@ -134,7 +132,7 @@ <h2 id="Stubs">Stubs</h2>
Stubs allow behaviours to be specified for methods that can be called any number of times and are not to be included in the mock's verification check.

<pre>
mock.stubs(pmock.once()).sleep().will(pmock.return_value(True))
mock.stubs().sleep().will(pmock.return_value(True))
</pre>

<h2 id="FromImports">From imports</h2>
Expand Down

0 comments on commit 0ba5a2e

Please sign in to comment.