Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Test if commit works
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas committed Apr 28, 2014
1 parent 04c1269 commit e5c36a8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions spec/gitolite_admin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

describe Gitolite::GitoliteAdmin do

conf_dir = File.join(File.dirname(__FILE__), 'fixtures', 'configs')
output_dir = '/tmp'
# output_dir = File.join(File.dirname(File.dirname(__FILE__)), 'tmp')

Expand Down Expand Up @@ -32,4 +33,21 @@
end
end

describe '#save' do
it 'should commit file to gitolite-admin repository' do
test_dir = File.join(output_dir, 'gitolite-admin-test')
opts = { :overwrite => true }
gl_admin = GitoliteAdmin.bootstrap(test_dir, opts)

c = Gitolite::Config.new(File.join(conf_dir, 'complicated.conf'))
c.filename = 'gitolite.conf'

gl_admin.config = c
gl_admin.save

new_file = File.join(test_dir, 'conf', c.filename)
expect(File.file?(new_file)).to be true
end
end

end

0 comments on commit e5c36a8

Please sign in to comment.