Sha256: a8645a95c4e01624ec974a3e05f8423a7c70eee20e1b24c56dc4076d7bf3a58e

Contents?: true

Size: 657 Bytes

Versions: 15

Compression:

Stored size: 657 Bytes

Contents

require "#{File.dirname(__FILE__)}/../lib/gitrb"
require "#{File.dirname(__FILE__)}/helper"
require 'pp'

describe Gitrb do

  REPO = '/tmp/gitrb_test.git'

  attr_reader :repo

  before(:each) 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_error(ArgumentError)
  end

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

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

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
gitrb-0.1.5 test/bare_repository_spec.rb
gitrb-0.1.4 test/bare_repository_spec.rb
gitrb-0.1.3 test/bare_repository_spec.rb
gitrb-0.1.2 test/bare_repository_spec.rb
gitrb-0.1.1 test/bare_repository_spec.rb
gitrb-0.1.0 test/bare_repository_spec.rb
gitrb-0.0.9 test/bare_repository_spec.rb
gitrb-0.0.8 test/bare_repository_spec.rb
gitrb-0.0.7 test/bare_repository_spec.rb
gitrb-0.0.6 test/bare_repository_spec.rb
gitrb-0.0.5 test/bare_repository_spec.rb
gitrb-0.0.4 test/bare_repository_spec.rb
gitrb-0.0.3 test/bare_repository_spec.rb
gitrb-0.0.2 test/bare_repository_spec.rb
gitrb-0.0.1 test/bare_repository_spec.rb