r24110@martha (orig r992): t0m | 2008-11-26 15:37:59 -0500
[catagits/Reaction.git] / t / lib / RTest / UI / View.pm
CommitLineData
c4481e73 1package RTest::UI::View;
2
3use base qw/Reaction::Test/;
4use Reaction::Class;
5use Test::More ();
6use Reaction::UI::View ;
7
8
9#has 'view' => (isa => 'Reaction::UI::View', is => 'ro', lazy_build => 1);
10#view doesn't yet have TCs for this so ican get away with it ...
11#sub _build_view {
12# Reaction::UI::View->new(
13# );
14#}
15
16sub test_layoutset_name_generation :Tests {
17 my $self = shift;
18 my %cases =
19 (
20 'MyApp::ViewPort::FooBar' => 'foo_bar',
21 'Reaction::UI::ViewPort::Foo_Bar' => 'foo_bar',
22 'MyApp::UI::ViewPort::FOOBar::fooBAR' => 'foo_bar/foo_bar',
23 'Reaction::UI::ViewPort::FooBARBaz::FooBAR_' => 'foo_bar_baz/foo_bar_',
24 );
25 while(my($class,$layout) = each %cases ){
26 my $res = Reaction::UI::View->layout_set_name_from_viewport($class);
27 Test::More::is($res,$layout,"layoutset name for $class")
28 }
29
30}
31
321;