Skip to content

Commit

Permalink
add spec for URI#parse
Browse files Browse the repository at this point in the history
  • Loading branch information
AI-Mozi committed May 12, 2023
1 parent aca4695 commit afd0556
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion library/uri/generic/host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
require 'uri'

describe "URI::Generic#host" do
it "needs to be reviewed for spec completeness"
ruby_version_is "3.2" do
it "returns empty string if is not valid" do
URI.parse('http:////foo.com').host.should == ''
end
end
end

describe "URI::Generic#host=" do
Expand Down
6 changes: 5 additions & 1 deletion library/uri/generic/to_s_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
require 'uri'

describe "URI::Generic#to_s" do
it "needs to be reviewed for spec completeness"
ruby_version_is "3.2" do
it "returns proper url" do
URI('http:///foo.com').to_s.should == 'http:///foo.com'
end
end
end

0 comments on commit afd0556

Please sign in to comment.