savon_spec 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/savon/spec.rb +1 -1
- data/lib/savon/spec/mock.rb +5 -5
- data/lib/savon/spec/version.rb +1 -1
- data/savon_spec.gemspec +1 -1
- metadata +7 -8
data/lib/savon/spec.rb
CHANGED
data/lib/savon/spec/mock.rb
CHANGED
@@ -15,7 +15,7 @@ module Savon
|
|
15
15
|
def expects(expected)
|
16
16
|
self.action = expected
|
17
17
|
|
18
|
-
Savon.config.hooks.define(:spec_action, :soap_request) do |request|
|
18
|
+
Savon.config.hooks.define(:spec_action, :soap_request) do |_, request|
|
19
19
|
actual = request.soap.input[1]
|
20
20
|
raise ExpectationError, "expected #{action.inspect} to be called, got: #{actual.inspect}" unless actual == action
|
21
21
|
|
@@ -28,7 +28,7 @@ module Savon
|
|
28
28
|
# Accepts a SOAP +body+ to check if it was set. Also accepts a +block+
|
29
29
|
# which receives the <tt>Savon::SOAP::Request</tt> to set up custom expectations.
|
30
30
|
def with(body = nil, &block)
|
31
|
-
Savon.config.hooks.define(:spec_body, :soap_request) do |request|
|
31
|
+
Savon.config.hooks.define(:spec_body, :soap_request) do |_, request|
|
32
32
|
if block
|
33
33
|
block.call(request)
|
34
34
|
else
|
@@ -49,7 +49,7 @@ module Savon
|
|
49
49
|
when Hash then response
|
50
50
|
end
|
51
51
|
|
52
|
-
Savon.config.hooks.define(:spec_response, :soap_request) do |request|
|
52
|
+
Savon.config.hooks.define(:spec_response, :soap_request) do |_, request|
|
53
53
|
respond_with(http)
|
54
54
|
end
|
55
55
|
|
@@ -58,9 +58,9 @@ module Savon
|
|
58
58
|
|
59
59
|
# Expects that the +action+ doesn't get called.
|
60
60
|
def never
|
61
|
-
Savon.config.hooks.reject
|
61
|
+
Savon.config.hooks.reject(:spec_action)
|
62
62
|
|
63
|
-
Savon.config.hooks.define(:spec_never, :soap_request) do |request|
|
63
|
+
Savon.config.hooks.define(:spec_never, :soap_request) do |_, request|
|
64
64
|
actual = request.soap.input[1]
|
65
65
|
raise ExpectationError, "expected #{action.inspect} never to be called, but it was!" if actual == action
|
66
66
|
|
data/lib/savon/spec/version.rb
CHANGED
data/savon_spec.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: savon_spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
8
|
+
- 3
|
9
9
|
- 0
|
10
|
-
version: 1.
|
10
|
+
version: 1.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Daniel Harrington
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-06-
|
18
|
+
date: 2012-06-09 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -23,12 +23,11 @@ dependencies:
|
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
hash:
|
26
|
+
hash: 15
|
27
27
|
segments:
|
28
|
+
- 1
|
28
29
|
- 0
|
29
|
-
|
30
|
-
- 10
|
31
|
-
version: 0.9.10
|
30
|
+
version: "1.0"
|
32
31
|
name: savon
|
33
32
|
type: :runtime
|
34
33
|
prerelease: false
|