### ----------------------------------------------------
### -- Resource::Wrangler
### -- Licenses: Artistic 2.0
### -- Authors: 
### -- File: t/00-load-resource-to-path.rakutest
### ----------------------------------------------------
use v6.d;
use Resource::Wrangler;
use Test;

plan 3;


my $path;
my $filename = Resource::Wrangler::random-sequence;
my $prefix = $*TMPDIR.add(Resource::Wrangler::random-sequence);
lives-ok {
    $path = load-resource-to-path("test", :$filename, :$prefix)
}, "Survives loading resource to path";

ok ~$path eq ~$prefix.add($filename), "The path is as expected";

ok $path.IO.slurp eq "sometimes-simple-is-actually-simple",
    "Contents are exactly as they should be";


