Sha256: c559fee9d1d86969d6f171a4d6f9abb0857705213d90ce6bdd86943ea73ee1f4
Contents?: true
Size: 971 Bytes
Versions: 1
Compression:
Stored size: 971 Bytes
Contents
require File.expand_path "../test_helper", __FILE__ require 'base64' context "Rugged::Object stuff" do setup do @path = File.dirname(__FILE__) + '/fixtures/testrepo.git/' @repo = Rugged::Repository.new(@path) end test "cannot lookup a non-existant object" do assert_raise Rugged::OdbError do obj = @repo.lookup("a496071c1b46c854b31185ea97743be6a8774479") end end test "can lookup an object" do obj = @repo.lookup("8496071c1b46c854b31185ea97743be6a8774479") assert_equal :commit, obj.type assert_equal '8496071c1b46c854b31185ea97743be6a8774479', obj.oid end test "same looked up objects are the same" do obj = @repo.lookup("8496071c1b46c854b31185ea97743be6a8774479") obj2 = @repo.lookup("8496071c1b46c854b31185ea97743be6a8774479") assert_equal obj, obj2 end test "can read raw data from an object" do obj = @repo.lookup("8496071c1b46c854b31185ea97743be6a8774479") assert obj.read_raw end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rugged-0.17.0b1 | test/object_test.rb |