Sha256: 5b40f0b15fe9aaae1c7d0d797df064d4769f9a3a98c3e21e7fcd83ae065a694d

Contents?: true

Size: 1.07 KB

Versions: 1

Compression:

Stored size: 1.07 KB

Contents

require 'gratr'
require 'grit'
require 'gitolite/gitolite_admin'
require 'gitolite/config'
require 'spec_helper'
include Gitolite

describe Gitolite::GitoliteAdmin do

  describe '#bootstrap' do
    it 'should bootstrap a gitolite-admin repository' do
      test_dir = '/tmp/gitolite-admin-test'
      opts = { :overwrite => false }
      gl_admin = GitoliteAdmin.bootstrap(test_dir, opts)

      expect(gl_admin).to be_a Gitolite::GitoliteAdmin
      expect(GitoliteAdmin.is_gitolite_admin_repo?(test_dir)).to be true
    end

    it 'should bootstrap (overwrite) a gitolite-admin repository' do
      test_dir = '/tmp/gitolite-admin-test'
      opts = { :overwrite => true }
      gl_admin = GitoliteAdmin.bootstrap(test_dir, opts)

      expect(gl_admin).to be_a Gitolite::GitoliteAdmin
      expect(GitoliteAdmin.is_gitolite_admin_repo?(test_dir)).to be true
    end
  end

  describe '#is_gitolite_admin_repo?' do
    it 'should detect a non gitolite-admin repository' do
      test_dir = '/tmp'
      expect(GitoliteAdmin.is_gitolite_admin_repo?(test_dir)).to be false
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jbox-gitolite-1.2.0 spec/gitolite_admin_spec.rb