spec/pathops_spec.rb in hx-0.7.4 vs spec/pathops_spec.rb in hx-0.8.2
- old
+ new
@@ -12,16 +12,16 @@
@source.add_entry('bar', 'BAR')
@add = Hx::AddPath.new(@source, :prefix => 'XXX', :suffix => 'YYY')
end
it "should return itself from each_entry" do
- @add.each_entry {}.should == @add
+ @add.each_entry(Hx::Path::ALL) {}.should == @add
end
it "yields augmented paths from each_entry" do
paths = Set[]
- @add.each_entry do |path, entry|
+ @add.each_entry(Hx::Path::ALL) do |path, entry|
paths.add path
end
paths.should == @after_paths
end
end
@@ -34,16 +34,16 @@
@source.add_entry('XXXbarYYY', 'BAR')
@strip = Hx::StripPath.new(@source, :prefix => 'XXX', :suffix => 'YYY')
end
it "should return itself from each_entry" do
- @strip.each_entry {}.should == @strip
+ @strip.each_entry(Hx::Path::ALL) {}.should == @strip
end
it "yields stripped paths from each_entry" do
paths = Set[]
- @strip.each_entry do |path, entry|
+ @strip.each_entry(Hx::Path::ALL) do |path, entry|
paths.add path
end
paths.should == @after_paths
end
end
@@ -57,15 +57,15 @@
end
@subset = Hx::PathSubset.new(@source, :only => 'foo/*')
end
it "returns itself from each_entry" do
- @subset.each_entry {}.should == @subset
+ @subset.each_entry(Hx::Path::ALL) {}.should == @subset
end
it "enumerates paths according to the subset filter" do
actual_paths = Set[]
- @subset.each_entry do |path, entry|
+ @subset.each_entry(Hx::Path::ALL) do |path, entry|
actual_paths.add path
end
actual_paths.should == Set['foo/bar', 'foo/baz']
end
end