Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-11-17 01:10:27 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-11-17 01:10:27 +0300
commit6f714dfb4a9b823ab75508f252d06e19e286d5f2 (patch)
tree409569ad65f1982451d9eb9a5bb0eae078abf01a /spec/support/matchers
parent2749e7a58285e59381a3e788983678d9cf633b45 (diff)
Improve code design after code review
Diffstat (limited to 'spec/support/matchers')
-rw-r--r--spec/support/matchers/be_url.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/matchers/be_url.rb b/spec/support/matchers/be_url.rb
new file mode 100644
index 00000000000..f8096af1b22
--- /dev/null
+++ b/spec/support/matchers/be_url.rb
@@ -0,0 +1,5 @@
+RSpec::Matchers.define :be_url do |_|
+ match do |actual|
+ URI.parse(actual) rescue false
+ end
+end