Skip to content

Commit

Permalink
Accepts partial match on custom cassettes url
Browse files Browse the repository at this point in the history
  • Loading branch information
parroty committed Mar 5, 2014
1 parent 986a034 commit 0e45b62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/exvcr/handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ defmodule ExVCR.Handler do

defp match_by_url(response, keys, custom_mode) do
if custom_mode do
pattern = Regex.compile!("^#{response[:request].url}$")
pattern = Regex.compile!("^#{response[:request].url}.*$")
Regex.match?(pattern, to_string(keys[:url]))
else
request_url = response[:request].url |> to_string |> ExVCR.Filter.strip_query_params
Expand Down

0 comments on commit 0e45b62

Please sign in to comment.