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.5.travis.781.4 spec/cli/repo_command_spec.rb
travis-1.8.4 spec/cli/repo_command_spec.rb
travis-1.8.5.travis.779.4 spec/cli/repo_command_spec.rb
travis-1.8.3 spec/cli/repo_command_spec.rb
travis-1.8.4.travis.777.4 spec/cli/repo_command_spec.rb
travis-1.8.4.travis.775.4 spec/cli/repo_command_spec.rb
travis-1.8.3.travis.773.4 spec/cli/repo_command_spec.rb
travis-async-listener-1.8.3 spec/cli/repo_command_spec.rb
travis-1.8.3.travis.745.4 spec/cli/repo_command_spec.rb
travis-1.8.3.travis.726.4.pre.debug spec/cli/repo_command_spec.rb
travis-1.8.3.travis.724.4 spec/cli/repo_command_spec.rb
travis-1.8.2 spec/cli/repo_command_spec.rb
travis-1.8.2.travis.722.4 spec/cli/repo_command_spec.rb
travis-1.8.2.travis.719.4 spec/cli/repo_command_spec.rb
travis-1.8.1 spec/cli/repo_command_spec.rb
travis-1.8.1.travis.717.4 spec/cli/repo_command_spec.rb