Sha256: 412e679492c14b8779a75318e58d6fef8b648ef9a966c5ad111c15cd3b1b5b7d

Contents?: true

Size: 840 Bytes

Versions: 156

Compression:

Stored size: 840 Bytes

Contents

require 'spec_helper'
require 'uri'

describe Travis::CLI::RepoCommand do
  describe '#parse_remote' do
    it 'handles git@github.com URIs' do
      path = subject.send(:parse_remote, 'git@github.com:travis-ci/travis.rb.git')
      path.should be == '/travis-ci/travis.rb.git'
    end

    it 'handles GitHub Enterprise URIS' do
      path = subject.send(:parse_remote, 'git@example.com:travis-ci/travis.rb.git')
      path.should be == '/travis-ci/travis.rb.git'
    end

    it 'handles HTTPS URIs' do
      path = subject.send(:parse_remote, 'https://github.com/travis-ci/travis.rb.git')
      path.should be == '/travis-ci/travis.rb.git'
    end

    it 'raises URI::InvalidURIError for invalid URIs' do
      expect { subject.send(:parse_remote, "foo@example.com:baz/bar.git") }.to raise_error(URI::InvalidURIError)
    end
  end
end

Version data entries

156 entries across 156 versions & 3 rubygems

Version Path
travis-1.8.9.travis.874.3 spec/cli/repo_command_spec.rb
travis-1.8.9.travis.867.4 spec/cli/repo_command_spec.rb
travis-1.8.9.travis.853.4 spec/cli/repo_command_spec.rb
travis-1.8.9.travis.844.4 spec/cli/repo_command_spec.rb
travis-1.8.9.travis.837.4 spec/cli/repo_command_spec.rb
travis-1.8.8 spec/cli/repo_command_spec.rb
travis-1.8.9.travis.826.4 spec/cli/repo_command_spec.rb
travis-1.8.7.travis.823.4 spec/cli/repo_command_spec.rb
travis-1.8.7.travis.818.4 spec/cli/repo_command_spec.rb
travis-1.8.7.travis.812.4 spec/cli/repo_command_spec.rb
travis-1.8.6 spec/cli/repo_command_spec.rb
travis-1.8.7.travis.809.4 spec/cli/repo_command_spec.rb
travis-1.8.7.travis.808.4 spec/cli/repo_command_spec.rb
travis-1.8.6.travis.807.4 spec/cli/repo_command_spec.rb
travis-1.8.5 spec/cli/repo_command_spec.rb
travis-1.8.6.travis.796.4 spec/cli/repo_command_spec.rb
travis-1.8.5.travis.793.4 spec/cli/repo_command_spec.rb
travis-1.8.5.travis.791.4 spec/cli/repo_command_spec.rb
travis-1.8.5.travis.784.4 spec/cli/repo_command_spec.rb
travis-1.8.5.travis.783.4 spec/cli/repo_command_spec.rb