Module: RSpec::SleepingKingStudios::Matchers::Description

Included in:
BaseMatcher, BuiltIn::IncludeMatcher
Defined in:
lib/rspec/sleeping_king_studios/matchers/description.rb

Overview

Reusable logic for building a matcher description across different versions of the base RSpec library.

Since:

  • 2.2.0

Constant Summary collapse

DEFAULT_EXPECTED_ITEMS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 2.2.0

Object.new

Instance Method Summary collapse

Instance Method Details

#descriptionString

A short string that describes the purpose of the matcher.

Returns:

  • (String)

    the matcher description

Since:

  • 2.2.0



20
21
22
23
24
25
26
# File 'lib/rspec/sleeping_king_studios/matchers/description.rb', line 20

def description
  desc = matcher_name

  desc << format_expected_items

  desc
end