spec/heuristic_parse_spec.rb in gitable-0.1.3 vs spec/heuristic_parse_spec.rb in gitable-0.2.0
- old
+ new
@@ -1,6 +1,6 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe Gitable::URI, ".heuristic_parse" do
it "returns a Gitable::URI" do
uri = "http://github.com/martinemde/gitable"
Gitable::URI.heuristic_parse(uri).should be_a_kind_of(Gitable::URI)
@@ -18,23 +18,17 @@
it "doesn't break the already valid URI: #{uri.inspect}" do
Gitable::URI.heuristic_parse(uri).to_s.should == uri
end
end
- it "guesses git://github.com/martinemde/gitable.git if I pass in the url bar" do
- uri = "http://github.com/martinemde/gitable"
+ it "guesses https://github.com/martinemde/gitable.git if I pass in the url bar" do
+ uri = "https://github.com/martinemde/gitable"
gitable = Gitable::URI.heuristic_parse(uri)
- gitable.to_s.should == "git://github.com/martinemde/gitable.git"
+ gitable.to_s.should == "https://github.com/martinemde/gitable.git"
end
it "isn't upset by trailing slashes" do
- uri = "http://github.com/martinemde/gitable/"
+ uri = "https://github.com/martinemde/gitable/"
gitable = Gitable::URI.heuristic_parse(uri)
- gitable.to_s.should == "git://github.com/martinemde/gitable.git/"
- end
-
- it "handles URIs with the name of the project in the path twice" do
- uri = "http://gitorious.org/project/project"
- gitable = Gitable::URI.heuristic_parse(uri)
- gitable.to_s.should == "git://gitorious.org/project/project.git"
+ gitable.to_s.should == "https://github.com/martinemde/gitable.git/"
end
end