App-af

 view release on metacpan or  search on metacpan

t/app_af.t  view on Meta::CPAN

use Test2::V0 -no_srand => 1;
use App::af;

subtest 'compute_class' => sub {

  subtest 'normal' => sub {

    local @ARGV = qw( download --foo --bar --baz );

    is( App::af->compute_class, 'App::af::download' );

  };

  subtest 'normal' => sub {

    local @ARGV = qw( --version );

    is( App::af->compute_class, 'App::af::default' );

  };

  subtest 'none' => sub {

    local @ARGV = qw();

    is( App::af->compute_class, 'App::af::default' );

  };

};

done_testing;



( run in 1.209 second using v1.01-cache-2.11-cpan-364913b4093 )