diff options
| author | Robert | 2017-11-16 16:03:06 +0100 |
|---|---|---|
| committer | Robert | 2017-11-16 16:03:06 +0100 |
| commit | 3b855c870e39f4a607ff3b473abfa169e231648d (patch) | |
| tree | 6aa8eb32d86edfb8109866df9bf8cc40af9f3d22 /spec/support | |
| parent | 30c362f0371c081e0ddb9bc13c5873b1aecda1eb (diff) | |
| download | chouette-core-robert-bup.tar.bz2 | |
Refs: #4461@1h; CodeReviewrobert-bup
- using webmock instead of mocking Net::HTTP
therefore removing the connascence between the spec and the
HTTP lib used in the implementation, thank you Teddy
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/webmock/helpers.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/webmock/helpers.rb b/spec/support/webmock/helpers.rb index fc6c77850..a6506c035 100644 --- a/spec/support/webmock/helpers.rb +++ b/spec/support/webmock/helpers.rb @@ -8,6 +8,11 @@ module Support def make_headers(headers={}, authorization_token:) headers.merge('Authorization' => "Token token=#{authorization_token.inspect}") end + + def with_stubbed_request( method, uri, &blk ) + stub_request(method, uri).tap(&blk) + end + end end end |
