Class: RSpec::SleepingKingStudios::Matchers::Core::AliasMethodMatcher

Inherits:
HaveAliasedMethodMatcher show all
Defined in:
lib/rspec/sleeping_king_studios/matchers/core/alias_method_matcher.rb

Overview

Matcher for testing whether an object aliases a specified method using the specified other method name.

Since:

  • 2.2.0

Constant Summary

Constants included from Description

Description::DEFAULT_EXPECTED_ITEMS

Instance Attribute Summary

Attributes inherited from BaseMatcher

#actual

Instance Method Summary collapse

Methods inherited from HaveAliasedMethodMatcher

#as, #description, #failure_message, #initialize

Methods inherited from BaseMatcher

#does_not_match?, #failure_message, #failure_message_when_negated

Methods included from Description

#description

Constructor Details

This class inherits a constructor from RSpec::SleepingKingStudios::Matchers::Core::HaveAliasedMethodMatcher

Instance Method Details

#matches?(actual) ⇒ Boolean

Tests the actual object to see if it matches the defined condition(s). Invoked by RSpec expectations.

Parameters:

  • actual (Object)

    the object to test against the matcher

Returns:

  • (Boolean)

    true if the object matches, otherwise false

Since:

  • 2.2.0



13
14
15
16
17
18
19
20
# File 'lib/rspec/sleeping_king_studios/matchers/core/alias_method_matcher.rb', line 13

def matches?(actual)
  SleepingKingStudios::Tools::CoreTools.deprecate(
    'AliasMethodMatcher',
    message: 'Use a HaveAliasedMethodMatcher instead.'
  )

  super
end