Flowdock
method

has

Importance_0
1.1.12 - Show latest stable - 0 notes - Class: Spec::Matchers
has(sym, *args) public

No documentation

This method has no description. You can help the RSpec community by adding new notes.

Hide source
# File lib/spec/matchers/has.rb, line 3
    def has(sym, *args) # :nodoc:
      simple_matcher do |actual, matcher|
        matcher.failure_message          = "expected ##{predicate(sym)}(#{args[0].inspect}) to return true, got false"
        matcher.negative_failure_message = "expected ##{predicate(sym)}(#{args[0].inspect}) to return false, got true"
        matcher.description              = "have key #{args[0].inspect}"
        actual.__send__(predicate(sym), *args)
      end
    end
Register or log in to add new notes.