test/url_test.rb in jakimowicz-longurl-0.1.1 vs test/url_test.rb in jakimowicz-longurl-0.1.3

- old
+ new

@@ -15,13 +15,14 @@ NotHTTPURLs = ["bleh", "bleh://", "bleh://asfd.com", "ftp://asdf.com", "google.com", - "asdf@toto.com"] + "asdf@toto.com", + "httpd://asdf.com"] - GoodURL = "http://www.google.com" + GoodURLs = ["http://www.google.com", "https://rubyonrails.org"] def test_check_should_raise_invalid_url_if_url_is_nil assert_raise(LongURL::InvalidURL) { LongURL::URL.check nil } end @@ -36,8 +37,8 @@ def test_check_should_raise_invalid_url_if_url_is_not_http NotHTTPURLs.each {|bad_url| assert_raise(LongURL::InvalidURL) { LongURL::URL.check bad_url } } end def test_check_should_returns_parsed_url_on_success - assert_equal URI.parse(GoodURL), LongURL::URL.check(GoodURL) + GoodURLs.each {|good_url| assert_equal URI.parse(good_url), LongURL::URL.check(good_url)} end end \ No newline at end of file