rester 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rester/client/adapters/stub_adapter.rb +4 -5
- data/lib/rester/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79a956ec7341aeae0c4895abc0684e5263768db7
|
4
|
+
data.tar.gz: d6df4b2046cf53633904e640fc9fd6f73ac54946
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7fb0534dc29e1212502043018e4168f1a0e85bfda35c5566ce737e7d06d3c5a77d37fc371d1e671d689c162730bb779a9feeea365060a4699f3f4c06103b771
|
7
|
+
data.tar.gz: 2cd61c0e13f38878324282d630c0945aca0465d1690a8a20db723204e085611342c66c480ee38a0de7d0708691a7d1cbf69de90c9a89ec81b8a2ba5d9ee6a304
|
@@ -66,8 +66,7 @@ module Rester
|
|
66
66
|
end
|
67
67
|
|
68
68
|
# Verify body, if there is one
|
69
|
-
request = action['request'] || {}
|
70
|
-
unless Utils.symbolize_keys(request) == params
|
69
|
+
unless (request = action['request'] || {}) == params
|
71
70
|
fail Errors::StubError,
|
72
71
|
"#{verb} #{path} with context '#{context}' params don't match stub. Expected: #{request} Got: #{params}"
|
73
72
|
end
|
@@ -82,10 +81,10 @@ module Rester
|
|
82
81
|
# Find the first request object with the same params as what's passed in.
|
83
82
|
# Useful for testing without having to set the context.
|
84
83
|
def _find_context_by_params(path, verb, params)
|
85
|
-
(stub[path][verb].find { |
|
86
|
-
|
84
|
+
(stub[path][verb].find { |_, action|
|
85
|
+
(action['request'] || {}) == params
|
87
86
|
} || []).first
|
88
87
|
end
|
89
88
|
end # StubAdapter
|
90
89
|
end # Client::Adapters
|
91
|
-
end # Rester
|
90
|
+
end # Rester
|
data/lib/rester/version.rb
CHANGED