class RSpec::Matchers::BuiltIn::Exist::ExistenceTest
@api private Simple class for memoizing actual/expected for this matcher and examining the match
Public Instance Methods
@api private @return [Boolean]
# File rspec-expectations/lib/rspec/matchers/built_in/exist.rb, line 54 def actual_exists? existence_values.first end
@return [Boolean]
# File rspec-expectations/lib/rspec/matchers/built_in/exist.rb, line 48 def valid_test? uniq_truthy_values.size == 1 end
@api private @return [String]
# File rspec-expectations/lib/rspec/matchers/built_in/exist.rb, line 60 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