mock_proxy 0.2.2 → 0.2.3
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/lib/mock_proxy/version.rb +1 -1
- data/lib/mock_proxy.rb +4 -3
- data/mock_proxy.gemspec +1 -0
- metadata +15 -1
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 418d9ed605b34dd982aeff5551e6447ece2ffe9f
         | 
| 4 | 
            +
              data.tar.gz: aa8df9a51b6d698c9828d5a5519648c91156e389
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 0b4c189c8f36de7bd7fdad795bef7b2116657b68c18bf81caff076492ca627a6f38124450f9af4720bfe0757dd91145f26e80e1ea3112d5a49efea660756ab83
         | 
| 7 | 
            +
              data.tar.gz: 4b49efca88282b9f55da569508dd7858c8b4c010c2e63e3efb14fdccf46e1a47b0604376187a7ef6dc71678e296264c4626a521774530897047d283946aa039a
         | 
    
        data/lib/mock_proxy/version.rb
    CHANGED
    
    
    
        data/lib/mock_proxy.rb
    CHANGED
    
    | @@ -1,4 +1,6 @@ | |
| 1 | 
            -
            require  | 
| 1 | 
            +
            require 'mock_proxy/version'
         | 
| 2 | 
            +
            require 'active_support'
         | 
| 3 | 
            +
            require 'active_support/core_ext'
         | 
| 2 4 |  | 
| 3 5 | 
             
            # A non-opinionated proxy object that has multiple uses. It can be used for mocking, spying,
         | 
| 4 6 | 
             
            # stubbing. Use as a dummy, double, fake, etc. Every test double type possible. How? Let's see
         | 
| @@ -220,10 +222,9 @@ class MockProxy | |
| 220 222 | 
             
                    else
         | 
| 221 223 | 
             
                      # Assign new hash (i.e. create new key path) if there is none (validate won't
         | 
| 222 224 | 
             
                      # create new path because it would have failed above)
         | 
| 223 | 
            -
                      callback_hash[key]  | 
| 225 | 
            +
                      callback_hash[key] || {}
         | 
| 224 226 | 
             
                    end
         | 
| 225 227 | 
             
                  end
         | 
| 226 | 
            -
                  end
         | 
| 227 228 | 
             
                end
         | 
| 228 229 | 
             
                proxy.instance_variable_set('@callback_hash', copied_callback_hash)
         | 
| 229 230 | 
             
              end
         | 
    
        data/mock_proxy.gemspec
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: mock_proxy
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.2. | 
| 4 | 
            +
              version: 0.2.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - matrinox
         | 
| @@ -38,6 +38,20 @@ dependencies: | |
| 38 38 | 
             
                - - "~>"
         | 
| 39 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 40 40 | 
             
                    version: '10.0'
         | 
| 41 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            +
              name: activesupport
         | 
| 43 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 | 
            +
                requirements:
         | 
| 45 | 
            +
                - - "~>"
         | 
| 46 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            +
                    version: 4.2.5.1
         | 
| 48 | 
            +
              type: :runtime
         | 
| 49 | 
            +
              prerelease: false
         | 
| 50 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 | 
            +
                requirements:
         | 
| 52 | 
            +
                - - "~>"
         | 
| 53 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            +
                    version: 4.2.5.1
         | 
| 41 55 | 
             
            description: |-
         | 
| 42 56 | 
             
              Remember when RSpec had stub_chain? They removed it for good reasons but sometimes you just need it.
         | 
| 43 57 | 
             
                Well, here it is, a proxy object. It doesn't actually mock anything for you (the name is just catchy) so you need to do that.
         |