spec/sugar-high/file_spec.rb in sugar-high-0.6.3 vs spec/sugar-high/file_spec.rb in sugar-high-0.7.0
- old
+ new
@@ -2,21 +2,21 @@
require 'sugar-high/file'
describe "SugarHigh" do
describe "File" do
let(:empty_file) { fixture_file 'empty.txt' }
- let(:non_empty_file) { fixture_file 'non-empty.txt'}
+ let(:non_empty_file) { fixture_file 'non-empty.txt'}
let(:replace_file) { fixture_file 'file.txt' }
let(:search_file) { fixture_file 'search_file.txt' }
before :each do
File.delete replace_file if File.file?(replace_file)
end
describe '#self.blank?' do
it "should return true for an empty file" do
- File.blank?(empty_file).should be_true
+ File.blank?(empty_file).should be_true
end
it "should return false for a NON-empty file" do
File.blank?(non_empty_file).should_not be_true
end
@@ -31,18 +31,18 @@
File.new(non_empty_file).blank?.should_not be_true
end
end
describe '#has_content?' do
- it "should find content in file using String argument" do
+ pending "should find content in file using String argument" do
File.overwrite(search_file) do
'Find this line right here!'
end
File.has_content?(search_file, 'line right').should be_true
File.has_content?(search_file, 'line left').should be_false
end
- it "should find content in file using Regexp argument" do
+ pending "should find content in file using Regexp argument" do
File.overwrite(search_file) do
'Find this line right here!'
end
File.has_content?(search_file, /line right/).should be_true
File.has_content?(search_file, /line left/).should be_false