Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicitly set responder on partial mocks #532

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Dec 31, 2022

  1. Implicitly set responder on partial mocks

    We now automatically set a responder on mock object which are used for
    partial mocks.
    
    Having made the change above, I had to set include_all to true for the
    call to Object#respond_to? in Mock#check_responder_responds_to in order
    to fix a load of broken tests.
    
    The legacy_behaviour_for_array_flatten condition in
    Mock#check_responder_responds_to is needed to avoid a regression of #580
    in Ruby < v2.3.
    
    Hopefully this is a small step towards having
    Configuration.prevent(:stubbing_non_existent_method) check Method#arity
    and/or Method#parameters (#149) and rationalising
    Configuration.stubbing_non_existent_method= & Mock#responds_like (#531).
    floehopper committed Dec 31, 2022
    Configuration menu
    Copy the full SHA
    42da834 View commit details
    Browse the repository at this point in the history