Skip to content

Commit

Permalink
Add a test for the example in the synopsis (which, conveninetly, simp…
Browse files Browse the repository at this point in the history
…ly *is* the synopsis.)
  • Loading branch information
jnthn committed Jul 4, 2010
1 parent 834db0d commit 0b8e82a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions t/synopsis.t
@@ -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.