Sha256: d41681748da1e7733ddfcc01267637c2c01e18853c0fb9d81b90b6ab55e79890

Contents?: true

Size: 830 Bytes

Versions: 8

Compression:

Stored size: 830 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../../test_helper')

describe ::Repomen::Repo::Service do
  let(:described_class) { ::Repomen::Repo::Service }

  it "should recognize a GitHub URL via git" do
    url = "git@github.com:octocat/Hello-World.git"
    service = described_class.for(url)
    refute service.nil?
    assert_equal :github, service.name
  end

  it "should recognize a GitHub URL with .rb at the end via git" do
    url = "git@github.com:bfontaine/Graphs.rb.git"
    service = described_class.for(url)
    refute service.nil?
    assert_equal :github, service.name
  end

  it "should recognize a BitBucket URL via git" do
    url = "git@bitbucket.org:atlassian_tutorial/helloworld.git"
    service = described_class.for(url)
    refute service.nil?
    assert_equal :bitbucket, service.name
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
repomen-0.2.1 test/repomen/repo/service_test.rb
repomen-0.2.0 test/repomen/repo/service_test.rb
repomen-0.2.0.rc1 test/repomen/repo/service_test.rb
repomen-0.1.8 test/repomen/repo/service_test.rb
repomen-0.1.7 test/repomen/repo/service_test.rb
repomen-0.1.6 test/repomen/repo/service_test.rb
repomen-0.1.5 test/repomen/repo/service_test.rb
repomen-0.1.4 test/repomen/repo/service_test.rb