Sha256: 917d08c174114ef2113ffd3e5e2c5ad99ef5696f4079aded76f432b91a1741eb

Contents?: true

Size: 675 Bytes

Versions: 3

Compression:

Stored size: 675 Bytes

Contents

require "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
    rawobj = @repo.read("41bc8c69075bbdb46c5c6f0566cc8cc5b46e8bd9")
    assert_match 'tree f82a8eb4cb20e88d1030fd10d89286215a715396', rawobj.data
    assert_equal 230, rawobj.len
    assert_equal :commit, rawobj.type
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rugged-0.17.0.b7 test/repo_pack_test.rb
rugged-0.17.0.b6 test/repo_pack_test.rb
rugged-0.17.0b2 test/repo_pack_test.rb