Sha256: 40474bf24492caf68dd40b93193a91d7994f7afb158f094dd8f4d292ee7e59f6
Contents?: true
Size: 888 Bytes
Versions: 16
Compression:
Stored size: 888 Bytes
Contents
require 'spec_helper' RSpec.describe Learn::RepoParser do context "URLs from github" do let!(:remote) { OpenStruct.new(:url => nil)} let!(:repo) { OpenStruct.new(:remote => remote)} it "supports ssh addresses" do expect(Git).to receive(:open).and_return(repo) remote.url = "git@github.com:flatiron-labs/learn-gem.git" expect(described_class.get_repo).to eq("learn-gem") end it "supports http addresses" do expect(Git).to receive(:open).and_return(repo) remote.url = "https://github.com/flatiron-labs/learn-gem.git" expect(described_class.get_repo).to eq("learn-gem") end it "supports http addresses without .git extension" do expect(Git).to receive(:open).and_return(repo) remote.url = "https://github.com/flatiron-labs/learn-gem" expect(described_class.get_repo).to eq("learn-gem") end end end
Version data entries
16 entries across 16 versions & 2 rubygems