Sha256: bde8bb8ed32254f2d92a363a038cdf7a39cac6e2613db28715ddfedbd77d5ea8

Contents?: true

Size: 688 Bytes

Versions: 1

Compression:

Stored size: 688 Bytes

Contents

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

context "Rugged::Repository packed stuff" do
  setup do
    path = File.dirname(__FILE__) + '/fixtures/testrepo.git/'
    @repo = Rugged::Repository.new(path)
  end

  test "can tell if a packed object exists" do
    assert @repo.exists("41bc8c69075bbdb46c5c6f0566cc8cc5b46e8bd9")
    assert @repo.exists("f82a8eb4cb20e88d1030fd10d89286215a715396")
  end

  test "can read a packed object from the db" do
    data, len, type = @repo.read("41bc8c69075bbdb46c5c6f0566cc8cc5b46e8bd9")
    assert_match 'tree f82a8eb4cb20e88d1030fd10d89286215a715396', data
    assert_equal 230, len
    assert_equal "commit", type
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rugged-0.0.1 test/repo_pack_test.rb