summaryrefslogtreecommitdiff
path: root/t/02-write.t
diff options
context:
space:
mode:
Diffstat (limited to 't/02-write.t')
-rw-r--r--t/02-write.t12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/02-write.t b/t/02-write.t
index 5eb7d92..7034302 100644
--- a/t/02-write.t
+++ b/t/02-write.t
@@ -1,18 +1,18 @@
#! /usr/bin/env perl6
use v6.c;
-use Test;
-use lib "lib";
use Config;
-use Config::Parser::toml;
use File::Temp;
+use Test;
+
+use Config::Parser::toml;
plan 4;
my $config = Config.new();
-$config.read({
+$config.=read({
first => {
a => "a",
b => "b"
@@ -25,10 +25,10 @@ $config.read({
my ($filename, $fh) = tempfile;
-ok $config.write($filename, "Config::Parser::toml"), "Write succeeded";
+ok $config.write($filename.IO, Config::Parser::toml), "Write succeeded";
is slurp("t/files/write.toml"), slurp($filename), "Written config is correct";
-ok $config.write($filename, "Config::Parser::toml"), "Write over non-empty file";
+ok $config.write($filename.IO, Config::Parser::toml), "Write over non-empty file";
is slurp("t/files/write.toml"), slurp($filename), "Written config is still correct";