Sha256: e8f5589a47d53a26b698ac83e678c82bf9371974b94b41934be60239e56d3bc5
Contents?: true
Size: 1.19 KB
Versions: 23
Compression:
Stored size: 1.19 KB
Contents
require 'spec_helper' require 'sugar-high/file_mutate' File.mutate_ext :all describe "SugarHigh::File" do let(:file_to_delete) { fixture_file 'file_to_delete.txt' } describe '#delete! (class)' do it 'should delete file' do File.overwrite(file_to_delete) do 'Delete this!' end File.delete! file_to_delete File.exist?(file_to_delete).should be_false end end describe '#delete_file! (class)' do it 'should delete file' do File.overwrite(file_to_delete) do 'Delete this!' end File.delete_file! file_to_delete File.exist?(file_to_delete).should be_false end end describe '#delete! (instance)' do it 'should delete file' do File.overwrite(file_to_delete) do 'Delete this!' end File.new(file_to_delete).delete! File.exist?(file_to_delete).should be_false end end describe '#delete_file! (instance)' do it 'should delete file' do File.overwrite(file_to_delete) do 'Delete this!' end File.new(file_to_delete).delete_file! File.exist?(file_to_delete).should be_false end end end
Version data entries
23 entries across 23 versions & 1 rubygems