Skip to content

Instantly share code, notes, and snippets.

@marcusramberg
Created November 27, 2008 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcusramberg/29861 to your computer and use it in GitHub Desktop.
Save marcusramberg/29861 to your computer and use it in GitHub Desktop.
=== t/unit_core_mvc.t
==================================================================
--- t/unit_core_mvc.t (revision 27978)
+++ t/unit_core_mvc.t (local)
@@ -1,4 +1,4 @@
-use Test::More tests => 45;
+use Test::More tests => 46;
use strict;
use warnings;
@@ -158,6 +158,11 @@
my $c = bless {}, 'MyApp';
+ # test accept-context with class rather than instance
+ MyApp->model('M', qw/foo bar/);
+ is_deeply($args, [qw/foo bar/], '$c->model args passed to ACCEPT_CONTEXT ok');
+
+
$c->model('M', qw/foo bar/);
is_deeply($args, [qw/foo bar/], '$c->model args passed to ACCEPT_CONTEXT ok');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment