Skip to content

Commit 7529a82

Browse files
author
David Zuckerman
committed
rspec tests for assert_file_not_processed!
1 parent 0e1bc1a commit 7529a82

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

spec/downloader/base_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,18 @@
99
end
1010
end
1111

12+
describe '#assert_file_not_processed!' do
13+
it 'proceeds if processed file is absent' do
14+
expect { subject.assert_file_not_processed! '/path/to/non-existent-file' }.not_to raise_error
15+
end
16+
17+
it 'raises if processed file exists' do
18+
Tempfile.open do |f|
19+
expect { subject.assert_file_not_processed! f.path }.to raise_error RuntimeError
20+
end
21+
end
22+
end
23+
1224
describe '#assert_not_exists!' do
1325
it 'proceeds if file is absent' do
1426
expect { subject.assert_not_exists! '/path/to/non-existent-file' }.not_to raise_error

0 commit comments

Comments
 (0)