require "test_helper" class BlobTest < Rugged::TestCase include Rugged::RepositoryAccess def test_read_blob_data oid = "fa49b077972391ad58037050f2a75f74e3671e92" blob = @repo.lookup(oid) assert_equal 9, blob.size assert_equal "new file\n", blob.content assert_equal :blob, blob.type assert_equal oid, blob.oid end end class BlobWriteTest < Rugged::TestCase include Rugged::TempRepositoryAccess def test_fetch_blob_content_with_nulls content = "100644 example_helper.rb\x00\xD3\xD5\xED\x9DA4_"+ "\xE3\xC3\nK\xCD