# encoding: utf-8 require 'spec_helper' describe FileDeleter do context '#use' do it 'deletes file' do test_file = create_file('file.html', '') file = double 'file' expect(file).to receive(:path).and_return(test_file) detector = FileDeleter.new detector.use file expect(File).not_to be_exist(file) end end end