From 7ee6b546006180c593e9a111769ad2ab07a315a4 Mon Sep 17 00:00:00 2001 From: Christian Bruckmayer <3799140+ChrisBr@users.noreply.github.com> Date: Fri, 31 Jul 2020 13:58:05 +0100 Subject: [PATCH] Include documentation RegEx hash_including matcher --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 58d0339f8..cdc1d53b5 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,12 @@ stub_request(:post, "www.example.com"). RestClient.post('www.example.com', "data[a]=1&data[b]=five&x=1", :content_type => 'application/x-www-form-urlencoded') # ===> Success + +stub_request(:post, "www.example.com"). + with(body: hash_including(id: /\d/)) + +RestClient.post('www.example.com', "id=1", +:content_type => 'application/x-www-form-urlencoded') # ===> Success ``` ### Matching custom request headers