Parent

Class/Module Index [+]

Quicksearch

RSpec::Matchers::BuiltIn::Exist::ExistenceTest

@api private Simple class for memoizing actual/expected for this matcher and examining the match

Public Instance Methods

actual_exists?() click to toggle source

@api private @return [Boolean]

# File lib/rspec/matchers/built_in/exist.rb, line 52
def actual_exists?
  existence_values.first
end
valid_test?() click to toggle source

@return [Boolean]

# File lib/rspec/matchers/built_in/exist.rb, line 46
def valid_test?
  uniq_truthy_values.size == 1
end
validity_message() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/exist.rb, line 58
def validity_message
  case uniq_truthy_values.size
  when 0
    " but it does not respond to either `exist?` or `exists?`"
  when 2
    " but `exist?` and `exists?` returned different values:\n\n"               " exist?: #{existence_values.first}\n"               "exists?: #{existence_values.last}"
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.