Skip to content

Commit

Permalink
Clarify README part about regexp matches in stub cassetes (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
brain-geek authored Jun 23, 2024
1 parent b1bf9d7 commit b8a715f
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 b8a715f

Please sign in to comment.