From cafd103a950682711fdc9e155d73da7f2fc59caa Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 20 May 2011 13:26:39 +0200 Subject: Mock Term::ReadLine so the App::Raps2 test runs fine without a tty --- t/29-app-raps2.t | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/29-app-raps2.t b/t/29-app-raps2.t index 8034791..d1f5bac 100644 --- a/t/29-app-raps2.t +++ b/t/29-app-raps2.t @@ -3,8 +3,18 @@ use strict; use warnings; use 5.010; -use Test::More tests => 3; -use Test::Fatal; +use Test::More; + +eval "use Test::MockObject"; +plan skip_all => 'Test::MockObject required' if $@; + +plan tests => 3; + +my $mock = Test::MockObject->new(); +$mock->fake_module( + 'Term::ReadLine', + new => sub { return bless({}, $_[0]) }, +); use_ok('App::Raps2'); -- cgit v1.2.3