Skip to content

Commit 93aa38c

Browse files
authored
Add spec for Purge (#25)
1 parent bcd8d83 commit 93aa38c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

spec/cli/commands/purge_spec.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,18 @@
44

55
describe Ronin::Wordlists::CLI::Commands::Purge do
66
include_examples "man_page"
7+
8+
describe '#run' do
9+
let(:cache_dir) { instance_double('CacheDir') }
10+
11+
before do
12+
allow(Ronin::Wordlists::CacheDir).to receive(:new).and_return(cache_dir)
13+
end
14+
15+
it 'must purge all cached wordlists' do
16+
expect(cache_dir).to receive(:purge)
17+
18+
subject.run
19+
end
20+
end
721
end

0 commit comments

Comments
 (0)