Commit 328303c6 authored by Douwe Maan's avatar Douwe Maan
Browse files

Fix spec by removing global state.

parent f6d1067ca9f5
......@@ -36,7 +36,6 @@
end
def address_regex
@address_regex ||= begin
wildcard_address = config.address
return nil unless wildcard_address
wildcard_address = config.address
return nil unless wildcard_address
......@@ -42,8 +41,7 @@
regex = Regexp.escape(wildcard_address)
regex = regex.gsub(Regexp.escape('%{reply_key}'), "(.+)")
Regexp.new(regex).freeze
end
regex = Regexp.escape(wildcard_address)
regex = regex.gsub(Regexp.escape('%{reply_key}'), "(.+)")
Regexp.new(regex).freeze
end
end
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment