summaryrefslogtreecommitdiff
path: root/spec/support/matchers/be_url.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/matchers/be_url.rb')
-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