Fix spec by removing global state.
This commit is contained in:
parent
afb765ad9e
commit
3d141d1512
1 changed files with 5 additions and 7 deletions
|
@ -36,14 +36,12 @@ module Gitlab
|
|||
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
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue