Skip to content

have_public_method and have_protected_method matchers are missing #80

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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