Sha256: 0b41e617c70b8e74e49002700eab9ff5634b268f08713aa44623799e22b4f4e4
Contents?: true
Size: 985 Bytes
Versions: 14
Compression:
Stored size: 985 Bytes
Contents
describe Hem::Helper do describe 'parse_github_url' do it 'should return the parts of a git protocol url' do url = 'git://github.com/foo/bar' expect(parse_github_url(url)).to eq({:owner => 'foo', :repo => 'bar'}) end it 'should return the parts of an https url' do url = 'https://github.com/foo/bar' expect(parse_github_url(url)).to eq({:owner => 'foo', :repo => 'bar'}) end it 'should return the parts of a git ssh url' do url = 'git@github.com:foo/bar' expect(parse_github_url(url)).to eq({:owner => 'foo', :repo => 'bar'}) end it 'should trim the .git https url ending if present' do url = 'https://github.com/foo/bar.git' expect(parse_github_url(url)).to eq({:owner => 'foo', :repo => 'bar'}) end it 'should trim the .git ssh url ending if present' do url = 'git@github.com:foo/bar.git' expect(parse_github_url(url)).to eq({:owner => 'foo', :repo => 'bar'}) end end end
Version data entries
14 entries across 14 versions & 1 rubygems