Permalink
Browse files

Add a test for the example in the synopsis (which, conveninetly, simp…

…ly *is* the synopsis.)
  • Loading branch information...
1 parent 834db0d commit 0b8e82a1d34d85ebe67428541df606497911da20 @jnthn committed Jul 4, 2010
Showing with 19 additions and 0 deletions.
  1. +19 −0 t/synopsis.t
View
@@ -0,0 +1,19 @@
+use Test;
+use Test::Mock;
+
+plan 2;
+
+class Foo {
+ method lol() { 'rofl' }
+ method wtf() { 'oh ffs' }
+}
+
+my $x = mocked(Foo);
+
+$x.lol();
+$x.lol();
+
+check-mock($x,
+ *.called('lol', times => 2),
+ *.never-called('wtf'),
+);

0 comments on commit 0b8e82a

Please sign in to comment.