protobuf-rspec 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/protobuf/rspec/helpers.rb +5 -5
- data/lib/protobuf/rspec/version.rb +1 -1
- metadata +13 -13
@@ -221,7 +221,7 @@ module Protobuf
|
|
221
221
|
# @return [Mock] the stubbed out client mock
|
222
222
|
def mock_remote_service(klass, method, cb_mocks={}, &assert_block)
|
223
223
|
self.class.subject_service { klass }
|
224
|
-
mock_rpc(method,
|
224
|
+
mock_rpc(method, cb_mocks, &assert_block)
|
225
225
|
end
|
226
226
|
alias_method :mock_service, :mock_remote_service
|
227
227
|
|
@@ -231,8 +231,8 @@ module Protobuf
|
|
231
231
|
|
232
232
|
subject_service.stub(:client).and_return(client)
|
233
233
|
|
234
|
-
if
|
235
|
-
client.should_receive(method).with(
|
234
|
+
if callbacks[:request]
|
235
|
+
client.should_receive(method).with(callbacks[:request])
|
236
236
|
elsif block_given?
|
237
237
|
client.should_receive(method) do |given_req|
|
238
238
|
assert_block.call(given_req)
|
@@ -241,8 +241,8 @@ module Protobuf
|
|
241
241
|
client.should_receive(method)
|
242
242
|
end
|
243
243
|
|
244
|
-
client.stub(:on_success).and_yield(
|
245
|
-
client.stub(:on_failure).and_yield(
|
244
|
+
client.stub(:on_success).and_yield(callbacks[:response]) if callbacks[:response]
|
245
|
+
client.stub(:on_failure).and_yield(callbacks[:error]) if callbacks[:error]
|
246
246
|
|
247
247
|
client
|
248
248
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protobuf-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-10-25 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: protobuf
|
16
|
-
requirement: &
|
16
|
+
requirement: &2154800360 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '2.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2154800360
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rspec
|
27
|
-
requirement: &
|
27
|
+
requirement: &2154799860 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '2.8'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2154799860
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rake
|
38
|
-
requirement: &
|
38
|
+
requirement: &2154799420 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2154799420
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: yard
|
49
|
-
requirement: &
|
49
|
+
requirement: &2154798860 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0.7'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2154798860
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: redcarpet
|
60
|
-
requirement: &
|
60
|
+
requirement: &2154798360 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '2.1'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2154798360
|
69
69
|
description: Protobuf RSpec helpers for testing services and clients. Meant to be
|
70
70
|
used with the protobuf gem. Decouple external services/clients from each other using
|
71
71
|
the given helper methods.
|
@@ -97,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
97
|
version: '0'
|
98
98
|
segments:
|
99
99
|
- 0
|
100
|
-
hash:
|
100
|
+
hash: 3890569250292723612
|
101
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
102
|
none: false
|
103
103
|
requirements:
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: '0'
|
107
107
|
segments:
|
108
108
|
- 0
|
109
|
-
hash:
|
109
|
+
hash: 3890569250292723612
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project: protobuf-rspec
|
112
112
|
rubygems_version: 1.8.15
|