Alien-Build-Plugin-Fetch-Prompt

 view release on metacpan or  search on metacpan

t/alien_build_plugin_fetch_promp.t  view on Meta::CPAN

use Test2::V0 -no_srand => 1, -no_utf8 => 1;
use Test2::Mock;
use Test::Alien::Build;
use Test2::Tools::Process qw( intercept_exit );
use ExtUtils::MakeMaker;
use Alien::Build::Plugin::Fetch::Prompt;
use Capture::Tiny qw( capture_merged );

$ENV{ALIEN_BUILD_PRELOAD} = 'Fetch::Prompt';
delete $ENV{ALIEN_DOWNLOAD};

t/alien_build_plugin_fetch_promp.t  view on Meta::CPAN


  share {

    start_url 'https://alienfile.org/foo/bar/baz';
  
    fetch sub {
      my($build, $url) = @_;
      
      return {
        type     => 'html',
        charset  => 'utf-8',
        base     => $url,
        content  => '<html/>',
        protocol => 'https',
      };
    };
  
  };  
};

my $mock = Test2::Mock->new(



( run in 0.220 second using v1.01-cache-2.11-cpan-4d50c553e7e )