repository_test.rb revision f458e516c452c779efc7fc8949edfc2092d3fb82
require 'test_helper'
context "a repository" do
setup do
end
context 'creating a permission' do
setup do
end
should 'with subject' do
end
should 'with role owner' do
end
end
context 'saving a file' do
setup do
@message = 'test message'
@content = "(Cat x)\n"
# create directory if it doesn't exist
end
# create file
end
should 'not have an ontology yet' do
end
context 'that doesn\'t exist' do
setup do
end
should 'create the file in the git repository' do
end
should 'create the file with correct contents in the git repository' do
end
should 'create a new ontology with a default name' do
end
should 'create a new ontology with only one version pointing to the commit' do
end
should 'create a new ontology with only one version belonging to the right user' do
end
end
context 'that exists' do
setup do
end
should 'create a new ontology version' do
end
end
end
end
context 'saving a file an ontology' do
setup do
@source_url = 'http://colore.googlecode.com/svn/trunk/ontologies/arithmetic/robinson_arithmetic.clif'
@ontology = Ontology.new \
:iri => 'http://example.com/ontology',
:versions_attributes => [{
}]
end
should 'create a version with source_url' do
end
end
end