Sha256: 77bc74d6ddd98197dc55fac5f2c7ff5e09cf6af9f438aeb1f3ce37c3a018feb0

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 KB

Contents

require File.join(File.dirname(__FILE__), '/test_helper.rb')

class GitHubRepositoryTest < Test::Unit::TestCase
  context "searching repositories" do
    setup do
      FakeWeb.register_uri('http://github.com/api/v1/xml/search/merb', :response => File.join(File.dirname(__FILE__), 'fixtures', 'search.xml'))

      @repositories = GitHub::Repository.search("merb")
    end

    test "size" do
      @repositories.size.should == 30
    end

    context "first" do
      setup do
        @repository = @repositories.first
      end

      test "#name" do
        @repository.name.should == "merb"
      end

      test "#watchers" do
        @repository.watchers.should == 15
      end

      test "#private" do
        @repository.private.should == false
      end

      test "#description" do
        @repository.description.should == "Merb official repository"
      end

      test "#forks" do
        @repository.forks.should == 0
      end

      test "#homepage" do
        @repository.homepage.should == "http://www.merbivore.com"
      end

      test "#owner" do
        @repository.owner.should == "merb"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dancroak-le-git-0.0.0 test/github_repository_test.rb
dancroak-le-git-0.0.2 test/github_repository_test.rb