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