Sha256: 12bd345db0d0986959ec495b99b32cfa1511ec43df7f2ba2bb641bd4f00cc071

Contents?: true

Size: 538 Bytes

Versions: 6

Compression:

Stored size: 538 Bytes

Contents

require 'helper'

describe Gitrb do

  REPO = '/tmp/gitrb_test.git'

  before do
    FileUtils.rm_rf REPO
    Dir.mkdir REPO

    @repo = Gitrb::Repository.new(:path => REPO, :create => true)
  end

  it 'should fail to initialize without a valid git repository' do
    lambda {
      Gitrb::Repository.new('/foo', 'master', true)
    }.should.raise(ArgumentError)
  end

  it 'should save and load entries' do
    repo.root['a'] = Gitrb::Blob.new(:data => 'Hello')
    repo.commit

    repo.root['a'].data.should.equal 'Hello'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gitrb-0.2.1 test/bare_repository_test.rb
gitrb-0.2.0 test/bare_repository_test.rb
gitrb-0.1.9 test/bare_repository_test.rb
gitrb-0.1.8 test/bare_repository_test.rb
gitrb-0.1.7 test/bare_repository_test.rb
gitrb-0.1.6 test/bare_repository_test.rb