6 use Web::Simple 'RunTest';
10 has test => is => ro => default => sub { 2 };
11 sub to_psgi_app { "to_psgi_app" }
16 sub { RunTest->run_if_script }
19 "to_psgi_app is called when run_if_script is called inside a function"
23 ( RunTest->run_if_script )[0]->test, #
25 "calling run_if_script on a class name instantiates it and runs it"
28 my $rt = RunTest->new( test => 3 );
31 [ $rt->run_if_script ], #
33 "calling run_if_script on an object runs it directly"
37 [ $rt->run_if_script( 4 ) ], #
38 [ $rt, $rt, 4, "run" ],
39 "passing arguments to run_if_script has them passed on to the run method"