lib/rspec/sleeping_king_studios/matchers/core/have_constant_matcher.rb
# Checks if the object has a constant :expected. Additionally, if a
# value expectation is set, compares the value of #expected to the
# specified value and checks the mutability of the constant.
#
# @param [Object] actual The object to check.
#
# @return [Boolean] true If the object has a constant :expected and matches
#    the value and mutability expectations (if any); otherwise false.
Checks if the object has a constant :expected. Additionally, if a
value expectation is set, compares the value of #expected to the
specified value and checks the mutability of the constant.
Checks if the object has a constant : expected . Additionally if a value expectation is set compares the value of #expected to the specified value and checks the mutability of the constant .
def matches? actual
      super
      @errors = {}
      return false unless has_constant?
      matches_constant? :all?
    end
def matches? actual super @errors = { } return false unless has_constant? matches_constant? :all? end
Checks if the object has a constant :expected.
Checks if the object has a constant : expected .
true If the object has a constant :expected and matches the value and mutability expectations (if any); otherwise false.
true If the object has a constant : expected and matches the value and mutability expectations ( if any ) ; otherwise false .
Boolean
actual
<not_specific>
<not_specific>
actual The object to check.
actual The object to check .