git_repository_test.rb revision 82943dcc7f878756736a3f21a8100b389b94ba46
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')
# removed because of time zone issues
#assert_equal Time.at(@repository.get_commit_author[:time]), Time.gm(@userinfo[:time])
end
should 'delete a file' do
end
should 'overwrite a file' do
content2 = "#{@content}_2"
message2 = "#{@message}_2"
end
end
end
end