sugar-high 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/sugar-high/file.rb +2 -1
- data/spec/spec_helper.rb +0 -1
- data/spec/sugar-high/file/file_mutate_spec.rb +14 -0
- data/sugar-high.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.5
|
data/lib/sugar-high/file.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -58,6 +58,20 @@ describe "SugarHigh::File" do
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
describe '#remove_from with block argument that is content to remove' do
|
62
|
+
let(:replace_file) { fixture_file 'file.txt' }
|
63
|
+
|
64
|
+
it "should remove content from existing file" do
|
65
|
+
File.overwrite(replace_file) do
|
66
|
+
'Hello You'
|
67
|
+
end
|
68
|
+
File.remove_from replace_file do
|
69
|
+
'You'
|
70
|
+
end
|
71
|
+
File.read(replace_file).should_not match /You/
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
61
75
|
|
62
76
|
describe '#insert_into' do
|
63
77
|
let(:insertion_file) { fixture_file 'insertion.txt' }
|
data/sugar-high.gemspec
CHANGED