rspec-intercept 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 547f924b48f1ed12d2cd7674ed49f381c1f81cce
4
- data.tar.gz: c70fe43ab938ff49e096d87e26eedc65dc24c12e
3
+ metadata.gz: a67ee26088808011578c31cdc17c53336fcc965d
4
+ data.tar.gz: 5d277563ee09b0d7d2d5189109a95a0990f86980
5
5
  SHA512:
6
- metadata.gz: 2f313691fd18524aa140de0ffc63c81c429497892108db00cbef0518cc8a8fdd26ecf847933d00fc8a9ba9986666c60d8399f24d1d75ccf8621cd0668039e06f
7
- data.tar.gz: 76b51e31dccc06f8fb908203746aa550e9cffdfa909906e4ad6eaa19da9f9151a5f54512b2ee75cee0d1b2067b32493e50b089e2c0c06ce4da67726003038a66
6
+ metadata.gz: ebf58ce16392bb868dc854ce907f89f67b12e4f62f4b2bfb43d286d0447ed0d9f404e96b9334bd22e57680e4d710571858bb3964c4556b76ccc78e1391730a48
7
+ data.tar.gz: 1ad3d1cfdf6d0c87bce9d66561e8355c14b7fac08d438ce7b3c872e3e2a3dd0b71be7866baf8138edfe8a331b5149388cdb58f259f9e518f62c29adf2477ddea
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # RSpec::Intercept
2
2
 
3
- TODO: Write a gem description
3
+ Lets you intercept method calls in RSpec tests and tinker with
4
+ the arguments for or the return value of the original method.
4
5
 
5
6
  ## Installation
6
7
 
@@ -20,11 +21,19 @@ Or install it yourself as:
20
21
 
21
22
  ## Usage
22
23
 
23
- TODO: Write usage instructions here
24
+ ```rb
25
+ intercept(Foo, :bar) do |method, *args, &block|
26
+ method.call(*args, &block)
27
+ end
28
+
29
+ intercept_any_instance_of(Foo, :bar) do |method, *args, &block|
30
+ method.call(*args, &block)
31
+ end
32
+ ```
24
33
 
25
34
  ## Contributing
26
35
 
27
- 1. Fork it ( https://github.com/[my-github-username]/rspec-intercept/fork )
36
+ 1. Fork it ( https://github.com/ad2games/rspec-intercept/fork )
28
37
  2. Create your feature branch (`git checkout -b my-new-feature`)
29
38
  3. Commit your changes (`git commit -am 'Add some feature'`)
30
39
  4. Push to the branch (`git push origin my-new-feature`)
@@ -1,4 +1,5 @@
1
1
  require "rspec/intercept/version"
2
+ require "rspec"
2
3
 
3
4
  module RSpec
4
5
  module Intercept
@@ -1,5 +1,5 @@
1
1
  module RSpec
2
2
  module Intercept
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-intercept
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Helge Rausch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-16 00:00:00.000000000 Z
11
+ date: 2014-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec-mocks