diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-24 09:07:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-24 09:07:44 +0000 |
commit | 6593f1f627938f22090dec5221476772d3ed581d (patch) | |
tree | ac5b9adf00f24f1d7cbc59c7d78f7c4fd06a0001 /spec/models/concerns | |
parent | 2f369bd95866b7f623387ce2b6acf646df3d5222 (diff) | |
download | gitlab-ce-6593f1f627938f22090dec5221476772d3ed581d.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/concerns')
-rw-r--r-- | spec/models/concerns/safe_url_spec.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/models/concerns/safe_url_spec.rb b/spec/models/concerns/safe_url_spec.rb index 0ad26660a60..e523e6a15e4 100644 --- a/spec/models/concerns/safe_url_spec.rb +++ b/spec/models/concerns/safe_url_spec.rb @@ -4,17 +4,19 @@ require 'spec_helper' describe SafeUrl do describe '#safe_url' do - class SafeUrlTestClass - include SafeUrl + let(:safe_url_test_class) do + Class.new do + include SafeUrl - attr_reader :url + attr_reader :url - def initialize(url) - @url = url + def initialize(url) + @url = url + end end end - let(:test_class) { SafeUrlTestClass.new(url) } + let(:test_class) { safe_url_test_class.new(url) } let(:url) { 'http://example.com' } subject { test_class.safe_url } |