spec/heuristic_parse_spec.rb in gitable-0.2.4 vs spec/heuristic_parse_spec.rb in gitable-0.3.0
- old
+ new
@@ -1,11 +1,11 @@
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)
+ expect(Gitable::URI.heuristic_parse(uri)).to be_a_kind_of(Gitable::URI)
end
[
"http://host.xz/path/to/repo.git/",
"http://host.xz/path/to/repo.git",
@@ -14,21 +14,21 @@
"user@host.xz:path/to/repo.git",
"user@host.xz:path/to/repo.git/",
"git@github.com:martinemde/gitable.git",
].each do |uri|
it "doesn't break the already valid URI: #{uri.inspect}" do
- Gitable::URI.heuristic_parse(uri).to_s.should == uri
+ expect(Gitable::URI.heuristic_parse(uri).to_s).to eq(uri)
end
end
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 == "https://github.com/martinemde/gitable.git"
+ expect(gitable.to_s).to eq("https://github.com/martinemde/gitable.git")
end
it "isn't upset by trailing slashes" do
uri = "https://github.com/martinemde/gitable/"
gitable = Gitable::URI.heuristic_parse(uri)
- gitable.to_s.should == "https://github.com/martinemde/gitable.git/"
+ expect(gitable.to_s).to eq("https://github.com/martinemde/gitable.git/")
end
end