Commit | Line | Data |
7d26c84b |
1 | use strict; |
2 | use warnings; |
f5cb8a51 |
3 | use Test::More tests => 6; |
7d26c84b |
4 | |
104abdae |
5 | use FindBin qw/$Bin/; |
6 | use lib "$Bin/lib"; |
7 | |
7d26c84b |
8 | use DynamicAppDemo; |
9 | |
10 | # Naughty, should make an app instance. |
11 | my $model = DynamicAppDemo->model('One'); |
12 | |
13 | ok $model; |
14 | isa_ok $model, 'SomeModelClass'; |
15 | is $model->say_hello('world'), 'Hello world'; |
16 | |
f5cb8a51 |
17 | ok(DynamicAppDemo->model('Two'), 'Have model Two'); |
18 | |
19 | ok(!DynamicAppDemo->model('Three'), 'No model Three'); |
20 | |
21 | ok(!DynamicAppDemo->model('Four'), 'No model Four'); |
22 | |