fakes-rspec 0.3.2 → 0.3.8
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.
- data/lib/core/version.rb +1 -1
- data/lib/fakes-rspec.rb +5 -0
- data/spec/specs/usage_spec.rb +16 -0
- metadata +2 -2
    
        data/lib/core/version.rb
    CHANGED
    
    
    
        data/lib/fakes-rspec.rb
    CHANGED
    
    
    
        data/spec/specs/usage_spec.rb
    CHANGED
    
    | @@ -101,6 +101,22 @@ describe "using the rspec extensions" do | |
| 101 101 | 
             
                  item.should have_received(:hello,matches.any)
         | 
| 102 102 | 
             
                end
         | 
| 103 103 |  | 
| 104 | 
            +
                it "should be able to determing if a call was made using a combination of arg matchers and explicit values" do
         | 
| 105 | 
            +
                  item = fake
         | 
| 106 | 
            +
                  item.hello("Yes",2)
         | 
| 107 | 
            +
             | 
| 108 | 
            +
                  item.should have_received(:hello,matches.regex(/Y/),2)
         | 
| 109 | 
            +
                end
         | 
| 110 | 
            +
              end
         | 
| 111 | 
            +
              context "using class swapping" do
         | 
| 112 | 
            +
                it "should be able to fake out behaviour of singleton methods" do
         | 
| 113 | 
            +
                  fake_class Dir
         | 
| 114 | 
            +
             | 
| 115 | 
            +
                  Dir.stub(:exist?).and_return false
         | 
| 116 | 
            +
             | 
| 117 | 
            +
                  Dir.exist('/').should be_false
         | 
| 118 | 
            +
                end
         | 
| 119 | 
            +
             | 
| 104 120 | 
             
                it "should be able to determing if a call was made using a combination of arg matchers and explicit values" do
         | 
| 105 121 | 
             
                  item = fake
         | 
| 106 122 | 
             
                  item.hello("Yes",2)
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: fakes-rspec
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.3. | 
| 4 | 
            +
              version: 0.3.8
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2012-06- | 
| 12 | 
            +
            date: 2012-06-11 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: rake
         |