Skip to content

Commit

Permalink
more monkey_patch tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 15, 2012
1 parent 607b550 commit d6ec549
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -3,6 +3,7 @@
- Added monkey_patch function to Mojo::Util.
- Updated jQuery to version 1.8.3.
- Improved documentation.
- Improved tests.
- Fixed small export bug in Mojolicious::Lite. (jberger)

3.67 2012-12-15
Expand Down
4 changes: 3 additions & 1 deletion t/mojo/util.t
Expand Up @@ -405,6 +405,8 @@ ok !MojoMonkeyTest->can('bar'), 'function "bar" does not exist';
monkey_patch 'MojoMonkeyTest', 'bar', sub {'bar'};
ok !!MojoMonkeyTest->can('bar'), 'function "bar" exists';
is MojoMonkeyTest::bar(), 'bar', 'right result';

monkey_patch 'MojoMonkeyTest', 'foo', sub {'baz'};
ok !!MojoMonkeyTest->can('foo'), 'function "foo" exists';
is MojoMonkeyTest::foo(), 'baz', 'right result';

done_testing();

0 comments on commit d6ec549

Please sign in to comment.