Sha256: 9498a2669fcd63814bfb92e6b2a853d519c9134de2a3172b89b1d30fce56b75b
Contents?: true
Size: 812 Bytes
Versions: 19
Compression:
Stored size: 812 Bytes
Contents
require File.dirname(__FILE__) + '/../lib/yawast' require File.dirname(__FILE__) + '/base' class TestCommandUtils < Minitest::Test include TestBase def test_valid_url args = ['http://www.apple.com'] uri = Yawast::Commands::Utils.extract_uri args assert_equal uri.to_s, 'http://www.apple.com/' end def test_partial_url args = ['www.apple.com'] uri = Yawast::Commands::Utils.extract_uri args assert_equal uri.to_s, 'http://www.apple.com/' end def test_invalid_url args = ['xxx:\invalid'] assert_raises URI::InvalidURIError do Yawast::Commands::Utils.extract_uri args end end def test_unresolvable_url args = ['http://www.gjhgjhbmnbmnvgccf.com'] assert_raises ArgumentError do Yawast::Commands::Utils.extract_uri args end end end
Version data entries
19 entries across 19 versions & 1 rubygems