summaryrefslogtreecommitdiff
path: root/spec/models/concerns/safe_url_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-24 09:07:44 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-24 09:07:44 +0000
commit6593f1f627938f22090dec5221476772d3ed581d (patch)
treeac5b9adf00f24f1d7cbc59c7d78f7c4fd06a0001 /spec/models/concerns/safe_url_spec.rb
parent2f369bd95866b7f623387ce2b6acf646df3d5222 (diff)
downloadgitlab-ce-6593f1f627938f22090dec5221476772d3ed581d.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/concerns/safe_url_spec.rb')
-rw-r--r--spec/models/concerns/safe_url_spec.rb14
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 }