diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-02 00:03:29 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-02 00:03:29 -0700 |
commit | d6eca5d1d0b2e6bf539f25ea10948c8c396cbe8e (patch) | |
tree | 857a3de435f2a4d58a8612992b0bc97509b659a8 /t/10_init.t | |
parent | 6e1ae015b4d6a55512be3f16f9a3eaaef343f09f (diff) | |
download | p5-Git-Annex-d6eca5d1d0b2e6bf539f25ea10948c8c396cbe8e.tar.gz |
tests: use 'is'
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 't/10_init.t')
-rwxr-xr-x | t/10_init.t | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/t/10_init.t b/t/10_init.t index b04321e..f49fd20 100755 --- a/t/10_init.t +++ b/t/10_init.t @@ -15,29 +15,29 @@ use File::Spec::Functions qw(catfile); { my $temp = tempdir CLEANUP => 1; my $annex = Git::Annex->new($temp); - ok $annex->toplevel eq $temp, "constructor sets toplevel to provided dir"; + is $annex->toplevel, $temp, "constructor sets toplevel to provided dir"; local $CWD = $temp; $annex = Git::Annex->new; - ok $annex->toplevel eq $temp, "constructor sets toplevel to pwd"; + is $annex->toplevel, $temp, "constructor sets toplevel to pwd"; } { my $temp = tempdir CLEANUP => 1; my $annex = Git::Annex->new($temp); - ok !defined $annex->{git}, "Git::Wrapper instance lazily instantiated"; + is $annex->{git}, undef, "Git::Wrapper instance lazily instantiated"; ok $annex->git->isa("Git::Wrapper") && defined $annex->{git}, "Git::Wrapper instance available"; - ok $annex->git->dir eq $temp, "Git::Wrapper has correct toplevel"; + is $annex->git->dir, $temp, "Git::Wrapper has correct toplevel"; } # lazy init of Git::Repository object requires an actual git repo, not # just an empty tempdir with_temp_annexes { my $annex = Git::Annex->new("source1"); - ok !defined $annex->{repo}, "Git::Repository instance lazily instantiated"; + is $annex->{repo}, undef, "Git::Repository instance lazily instantiated"; ok $annex->repo->isa("Git::Repository") && defined $annex->{repo}, "Git::Repository instance available"; - ok $annex->repo->work_tree eq catfile(shift, "source1"), + is $annex->repo->work_tree, catfile(shift, "source1"), "Git::Repository has correct toplevel"; }; |