App-Rssfilter
view release on metacpan or search on metacpan
t/lib/App/Rssfilter/Feed/Storage/Test/FetchersBehaveSensibleWhenUnderlyingFileNotPresent.pm view on Meta::CPAN
use Test::Routine;
use Test::More;
use Mojo::DOM;
use namespace::autoclean;
use Method::Signatures;
requires 'feed_storage';
requires 'tempfile';
requires 'tempdir';
test fetchers_behave_sensible_when_underlying_file_not_present => method {
$self->tempfile->remove;
is(
$self->feed_storage->last_modified,
'Thu, 01 Jan 1970 00:00:00 GMT',
'last_modified returns the epoch when its underlying file is not available'
);
is(
$self->feed_storage->load_existing,
t/lib/App/Rssfilter/Feed/Test/ExistingFeedNotReplaced.pm view on Meta::CPAN
package App::Rssfilter::Feed::Test::ExistingFeedNotReplaced;
use Test::Routine;
use Test::More;
use namespace::autoclean;
use Method::Signatures;
requires 'mock_storage';
test existing_feed_not_replaced => method {
ok(
!$self->mock_storage->called( 'save_feed' ),
'did not attempt to save a new feed over the existing feed'
);
};
1;
t/lib/App/Rssfilter/Feed/Test/RulesNotRun.pm view on Meta::CPAN
package App::Rssfilter::Feed::Test::RulesNotRun;
use Test::Routine;
use Test::More;
use namespace::autoclean;
use Method::Signatures;
requires 'mock_rule';
test rules_not_run => method {
ok(
! $self->mock_rule->called( 'constain' ),
'rules not run'
);
};
1;
( run in 2.475 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )