git_repository_test.rb revision f1304db188bff0f7c40172819863ffe54401b400
require 'test_helper'
# Tests a git repository
#
# Author: Eugen Kuksa <eugenk@informatik.uni-bremen.de>
context 'creating and deleting a repository' do
should 'create repository' do
@path_new = "#{@path}_new"
end
should 'delete repository' do
@path_new = "#{@path}_new"
end
end
context 'existing repository' do
setup do
@userinfo = {
time: Time.now
}
end
teardown do
@repository = nil
end
context 'using files' do
setup do
content = 'Some content'
message = 'Some commit message'
end
should 'create single commit of a file' do
content = 'Some content'
message = 'Some commit message'
assert_equal @repository.get_current_file(nil, 'path/file.txt')[:mime_type], Mime::Type.lookup('text/plain')
end
should 'delete a file' do
end
should 'overwrite a file' do
content2 = "#{content}_2"
message2 = "#{message}_2"
#assert_not_equal first_commit_oid, assert_equal @repository.commits.last.oid
end
end
end
end