spec/util/bagit_matchers.rb in bagit-0.4.2 vs spec/util/bagit_matchers.rb in bagit-0.4.3

- old
+ new

@@ -1,10 +1,7 @@ module BagitMatchers - - class BeIn - - + class BeIn def initialize(*expected_collection) @expected = expected_collection end def matches?(target) @@ -18,20 +15,17 @@ def failure_message_when_negated "expected <#{@target}> to not be in collection <#{@expected}>" end alias negative_failure_message failure_message_when_negated - end def be_in(*expected_collection) BeIn.new(*expected_collection) end - class ExistOnFS - - + class ExistOnFS def matches?(target) @target = target File.exist? target end @@ -41,16 +35,11 @@ def failure_message_when_negated "expected <#{@target}> to not exist but it does" end alias negative_failure_message failure_message_when_negated - end - def exist_on_fs + def exist_on_fs ExistOnFS.new end - - - - end