Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Examples: Stubbing most primitive returns is easier

  • Loading branch information...
commit 67d9a1d7eebfdfeb6b11980482f766d723457003 1 parent fb2e369
@jonreid authored
Showing with 2 additions and 4 deletions.
  1. +1 −2  Examples/MacExample/Example.m
  2. +1 −2  Examples/iOSExample/Example.m
View
3  Examples/MacExample/Example.m
@@ -80,8 +80,7 @@ - (void)testStubReturningPrimitive
{
NSArray *mockArray = mock([NSArray class]);
- [mockArray count];
- [givenPreviousCall willReturnUnsignedInteger:3];
+ [given([mockArray count]) willReturnUnsignedInteger:3];
assertThatUnsignedInteger([mockArray count], is(equalToUnsignedInteger(3)));
}
View
3  Examples/iOSExample/Example.m
@@ -80,8 +80,7 @@ - (void)testStubReturningPrimitive
{
NSArray *mockArray = mock([NSArray class]);
- [mockArray count];
- [givenPreviousCall willReturnUnsignedInteger:3];
+ [given([mockArray count]) willReturnUnsignedInteger:3];
assertThatUnsignedInteger([mockArray count], is(equalToUnsignedInteger(3)));
}
Please sign in to comment.
Something went wrong with that request. Please try again.