Sha256: d9c8822588a3c1fa78be1af071531129050dd88a8cd9afceeb43d19fea003c61
Contents?: true
Size: 656 Bytes
Versions: 7
Compression:
Stored size: 656 Bytes
Contents
require_relative '../spec_helper' require 'cliutils/messaging' require 'cliutils/prefs/pref_validators/pref_validator' require 'cliutils/prefs/pref_validators/url_validator' describe CLIUtils::UrlValidator do it 'confirms that its input is a URL' do v = CLIUtils::UrlValidator.new v.validate('http://www.google.com') expect(v.is_valid).to be_true expect(v.message).to eq('Response is not a URL: http://www.google.com') end it 'confirms that its input is not a URL' do v = CLIUtils::UrlValidator.new v.validate('!@&^') expect(v.is_valid).to_not be_true expect(v.message).to eq('Response is not a URL: !@&^') end end
Version data entries
7 entries across 7 versions & 1 rubygems