summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/25-app-raps2-basic.t17
-rw-r--r--t/29-app-raps2-store.t13
2 files changed, 4 insertions, 26 deletions
diff --git a/t/25-app-raps2-basic.t b/t/25-app-raps2-basic.t
index 53aa51d..127f904 100644
--- a/t/25-app-raps2-basic.t
+++ b/t/25-app-raps2-basic.t
@@ -3,26 +3,13 @@ use strict;
use warnings;
use 5.010;
-use Test::More;
-
-eval "use Test::MockObject";
-plan skip_all => 'Test::MockObject required' if $@;
-
-plan tests => 4;
-
-my $mock = Test::MockObject->new();
-$mock->fake_module(
- 'Term::ReadLine',
- new => sub { return bless({}, $_[0]) },
-);
+use Test::More tests => 3;
use_ok('App::Raps2');
-my $r2 = App::Raps2->new( dont_touch_fs => 1 );
+my $r2 = App::Raps2->new( dont_touch_fs => 1, no_cli => 1 );
isa_ok($r2, 'App::Raps2');
-isa_ok($r2->ui(), 'App::Raps2::UI');
-
is_deeply(
$r2->file_to_hash('t/in/hash'),
{ key => 'value', otherkey => 'othervalue' },
diff --git a/t/29-app-raps2-store.t b/t/29-app-raps2-store.t
index 759030d..026a529 100644
--- a/t/29-app-raps2-store.t
+++ b/t/29-app-raps2-store.t
@@ -3,23 +3,14 @@ use strict;
use warnings;
use 5.010;
-use Test::More;
-
-eval "use Test::MockObject";
-plan skip_all => 'Test::MockObject required' if $@;
+use Test::More tests => 9;
$ENV{XDG_CONFIG_HOME} = 't/config';
$ENV{XDG_DATA_HOME} = 't/data';
-plan tests => 9;
-
-my $mock = Test::MockObject->new();
-$mock->fake_module( 'Term::ReadLine', new => sub { return bless( {}, $_[0] ) },
-);
-
use_ok('App::Raps2');
-my $r2 = App::Raps2->new( master_password => 'sekrit' );
+my $r2 = App::Raps2->new( master_password => 'sekrit', no_cli => 1 );
isa_ok( $r2, 'App::Raps2' );
ok( -e 't/config/raps2/password', 'config file created' );