⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

have_public_method and have_protected_method matchers are missing #80

@trinistr

Description

@trinistr

There are matchers for pretty much all other variations of method-having, but there are none for #public_methods and #protected_methods:

$ ls lib/mspec/matchers/have*method*
lib/mspec/matchers/have_instance_method.rb
lib/mspec/matchers/have_method.rb
lib/mspec/matchers/have_private_instance_method.rb
lib/mspec/matchers/have_private_method.rb
lib/mspec/matchers/have_protected_instance_method.rb
lib/mspec/matchers/have_public_instance_method.rb
lib/mspec/matchers/have_singleton_method.rb

I would like to add these matchers for completeness.

Rationale:

  • I think anyone can reasonably expect to have these matchers available.
  • There are tests that would benefit (see for example core/argf/shared/each_codepoint.rb).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions