Method: Spec::Matchers#exist

Defined in:
lib/spec/matchers/exist.rb

#exist(arg = nil) ⇒ Object

:call-seq:

should exist
should_not exist

Passes if actual.exist?



8
9
10
11
12
13
14
# File 'lib/spec/matchers/exist.rb', line 8

def exist(arg=nil)
  Matcher.new :exist do
    match do |actual|
      arg ? actual.exist?(arg) : actual.exist?
    end
  end
end