mocha 1.16.0 → 1.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/RELEASE.md +6 -0
- data/lib/mocha/mock.rb +8 -8
- data/lib/mocha/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 4e91d0f079638506c5d57fc91f1d84f3232e9c9b923b4dcf173697ab564d72a9
         | 
| 4 | 
            +
              data.tar.gz: 7522a45c0fe7808e89b68e9703959fa320c722bf6fa760091e8aae7f9f25237c
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 4ac64c4e5ab1ffca88e410601a3f10e4dda4fde0cb2e00b6975280dcd9410f16918f249d6b98926cfc18956a165ef1e24d0d719d093ff29c9663bdfadb8b6457
         | 
| 7 | 
            +
              data.tar.gz: 4eb4166b55e1bb8ee63e8848db0f64d6368abe6ae03897aa680143e6a046202ec5420cbf2a2d01f2f4d0c893210dccf7277627ce81f3db523fd76c1de4618926
         | 
    
        data/RELEASE.md
    CHANGED
    
    
    
        data/lib/mocha/mock.rb
    CHANGED
    
    | @@ -182,11 +182,11 @@ module Mocha | |
| 182 182 | 
             
                  end
         | 
| 183 183 | 
             
                end
         | 
| 184 184 |  | 
| 185 | 
            -
                # Constrains the {Mock} instance so that it can only expect or stub methods to which +responder+ responds. The constraint is only applied at method invocation time.
         | 
| 185 | 
            +
                # Constrains the {Mock} instance so that it can only expect or stub methods to which +responder+ responds publicly. The constraint is only applied at method invocation time.
         | 
| 186 186 | 
             
                #
         | 
| 187 | 
            -
                # A +NoMethodError+ will be raised if the +responder+ does not +#respond_to?+  | 
| 187 | 
            +
                # A +NoMethodError+ will be raised if the +responder+ does not publicly +#respond_to?+ the invoked method (even if the method has been expected or stubbed).
         | 
| 188 188 | 
             
                #
         | 
| 189 | 
            -
                # The {Mock} instance will delegate its +#respond_to?+ method to the +responder+.
         | 
| 189 | 
            +
                # The {Mock} instance will delegate its +#respond_to?+ method to the +responder+. However, the +include_all+ parameter is not passed through, so only public methods on the +responder+ will be considered.
         | 
| 190 190 | 
             
                #
         | 
| 191 191 | 
             
                # Note that the methods on +responder+ are never actually invoked.
         | 
| 192 192 | 
             
                #
         | 
| @@ -236,11 +236,11 @@ module Mocha | |
| 236 236 | 
             
                  self
         | 
| 237 237 | 
             
                end
         | 
| 238 238 |  | 
| 239 | 
            -
                # Constrains the {Mock} instance so that it can only expect or stub methods to which an instance of the +responder_class+ responds. The constraint is only applied at method invocation time. Note that the responder instance is instantiated using +Class#allocate+.
         | 
| 239 | 
            +
                # Constrains the {Mock} instance so that it can only expect or stub methods to which an instance of the +responder_class+ responds publicly. The constraint is only applied at method invocation time. Note that the responder instance is instantiated using +Class#allocate+.
         | 
| 240 240 | 
             
                #
         | 
| 241 | 
            -
                # A +NoMethodError+ will be raised if the responder instance does not +#respond_to?+  | 
| 241 | 
            +
                # A +NoMethodError+ will be raised if the responder instance does not publicly +#respond_to?+ the invoked method (even if the method has been expected or stubbed).
         | 
| 242 242 | 
             
                #
         | 
| 243 | 
            -
                # The {Mock} instance will delegate its +#respond_to?+ method to the responder instance.
         | 
| 243 | 
            +
                # The {Mock} instance will delegate its +#respond_to?+ method to the responder instance. However, the +include_all+ parameter is not passed through, so only public methods on the +responder+  will be considered.
         | 
| 244 244 | 
             
                #
         | 
| 245 245 | 
             
                # Note that the methods on the responder instance are never actually invoked.
         | 
| 246 246 | 
             
                #
         | 
| @@ -325,9 +325,9 @@ module Mocha | |
| 325 325 | 
             
                end
         | 
| 326 326 |  | 
| 327 327 | 
             
                # @private
         | 
| 328 | 
            -
                def respond_to_missing?(symbol,  | 
| 328 | 
            +
                def respond_to_missing?(symbol, _include_all)
         | 
| 329 329 | 
             
                  if @responder
         | 
| 330 | 
            -
                    @responder.respond_to?(symbol | 
| 330 | 
            +
                    @responder.respond_to?(symbol)
         | 
| 331 331 | 
             
                  else
         | 
| 332 332 | 
             
                    @everything_stubbed || all_expectations.matches_method?(symbol)
         | 
| 333 333 | 
             
                  end
         | 
    
        data/lib/mocha/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: mocha
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.16. | 
| 4 | 
            +
              version: 1.16.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - James Mead
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2022- | 
| 11 | 
            +
            date: 2022-11-07 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 13 | 
             
            description: Mocking and stubbing library with JMock/SchMock syntax, which allows
         | 
| 14 14 | 
             
              mocking and stubbing of methods on real (non-mock) classes.
         |