X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Funit_core_mvc.t;h=c9f408ee580f28799c38ed43d6d262a761681297;hb=54642e5a9d2365d9765360614cd753d7ca1df7aa;hp=b5bbd8b36ebe15514374385d88c5ace826a123eb;hpb=582cd214c503e4df1a6ad58e5bccb1c0ac2852a1;p=catagits%2FCatalyst-Runtime.git diff --git a/t/unit_core_mvc.t b/t/unit_core_mvc.t index b5bbd8b..c9f408e 100644 --- a/t/unit_core_mvc.t +++ b/t/unit_core_mvc.t @@ -69,12 +69,12 @@ is_deeply( [ sort MyApp->models ], ok( $warnings, 'view() w/o a default is random, warnings thrown' ); } -is ( bless ({stash=>{current_view=>'V'}}, 'MyApp')->view , 'MyApp::View::V', 'current_view ok'); +is ( bless ( { context => Catalyst::Context->new(stash=>{current_view=>'V'}) }, 'MyApp')->view , 'MyApp::View::V', 'current_view ok'); my $view = bless {} , 'MyApp::View::V'; -is ( bless ({stash=>{current_view_instance=> $view }}, 'MyApp')->view , $view, 'current_view_instance ok'); +is ( bless ({ context => Catalyst::Context->new(stash=>{current_view_instance=> $view })}, 'MyApp')->view , $view, 'current_view_instance ok'); -is ( bless ({stash=>{current_view_instance=> $view, current_view=>'MyApp::V::View' }}, 'MyApp')->view , $view, +is ( bless ({ context => Catalyst::Context->new(stash=>{current_view_instance=> $view, current_view=>'MyApp::V::View' })}, 'MyApp')->view , $view, 'current_view_instance precedes current_view ok'); { @@ -91,20 +91,20 @@ is ( bless ({stash=>{current_view_instance=> $view, current_view=>'MyApp::V::Vie ok( $warnings, 'model() w/o a default is random, warnings thrown' ); } -is ( bless ({stash=>{current_model=>'M'}}, 'MyApp')->model , 'MyApp::Model::M', 'current_model ok'); +is ( bless({ context => Catalyst::Context->new({stash=>{current_model=>'M'}})}, 'MyApp')->model , 'MyApp::Model::M', 'current_model ok'); my $model = bless {} , 'MyApp::Model::M'; -is ( bless ({stash=>{current_model_instance=> $model }}, 'MyApp')->model , $model, 'current_model_instance ok'); +is ( bless ({context => Catalyst::Context->new(stash=>{current_model_instance=> $model })}, 'MyApp')->model , $model, 'current_model_instance ok'); -is ( bless ({stash=>{current_model_instance=> $model, current_model=>'MyApp::M::Model' }}, 'MyApp')->model , $model, +is ( bless ({context => Catalyst::Context->new(stash=>{current_model_instance=> $model, current_model=>'MyApp::M::Model' })}, 'MyApp')->model , $model, 'current_model_instance precedes current_model ok'); MyApp->config->{default_view} = 'V'; -is ( bless ({stash=>{}}, 'MyApp')->view , 'MyApp::View::V', 'default_view ok'); +is ( bless ({context => Catalyst::Context->new(stash=>{})}, 'MyApp')->view , 'MyApp::View::V', 'default_view ok'); is ( MyApp->view , 'MyApp::View::V', 'default_view in class method ok'); MyApp->config->{default_model} = 'M'; -is ( bless ({stash=>{}}, 'MyApp')->model , 'MyApp::Model::M', 'default_model ok'); +is ( bless ({context => Catalyst::Context->new(stash=>{})}, 'MyApp')->model , 'MyApp::Model::M', 'default_model ok'); is ( MyApp->model , 'MyApp::Model::M', 'default_model in class method ok'); # regexp behavior tests