Skip to content

Commit

Permalink
Clarify README part about regexp matches in stub cassetes
Browse files Browse the repository at this point in the history
  • Loading branch information
brain-geek committed Jun 21, 2024
1 parent b1bf9d7 commit 9c3b7d5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -741,14 +741,13 @@ test "match URL with regular expression" do
end
test "make sure to properly escape the /" do
# escape /path/to/file
use_cassette :stub, [url: "~r/\/path\/to\/file", body: "Stub Response", status_code: 200] do
use_cassette :stub, [url: "~r/\/path\/to\/file\/without\/trailing\/slash\/does\/not\/work", body: "Stub Response", status_code: 200] do
# ...
end
end
test "the sigil delimiter cannot be anything else" do
use_cassette :stub, [url: "~r{this-delimiter-doesn-not-work}", body: "Stub Response", status_code: 200] do
use_cassette :stub, [url: "~r{this-delimiter-does-not-work}", body: "Stub Response", status_code: 200] do
# ...
end
end
Expand Down

0 comments on commit 9c3b7d5

Please sign in to comment.