Chris@16: require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') Chris@16: Chris@16: describe Repository do Chris@16: fixtures :settings, :repositories Chris@16: Chris@16: describe "initialize" do Chris@16: before(:each) do Chris@16: @repo = Repository.new() Chris@16: end Chris@16: Chris@16: it "should properly set default values" do Chris@16: @repo.checkout_overwrite?.should be_false Chris@16: @repo.checkout_description.should match /Please select the desired protocol below to get the URL/ Chris@16: @repo.checkout_display_login?.should be_false # no subversion repo Chris@16: @repo.allow_subtree_checkout?.should be_false Chris@16: @repo.checkout_protocols.should eql [] Chris@16: end Chris@16: end Chris@16: Chris@16: describe "subtree checkout" do Chris@16: before(:each) do Chris@16: @svn = Repository::Subversion.new Chris@16: @git = Repository::Git.new Chris@16: end Chris@16: it "should be allowed on subversion" do Chris@16: @svn.allow_subtree_checkout?.should eql true Chris@16: end Chris@16: it "should only be possible if checked" do Chris@16: Chris@16: end Chris@16: Chris@16: it "should be forbidden on git" do Chris@16: @git.allow_subtree_checkout?.should eql false Chris@16: end Chris@16: end Chris@16: Chris@16: describe "extensions" do Chris@16: before(:each) do Chris@16: @repo = Repository::Subversion.new Chris@16: end Chris@16: Chris@16: it "should provide protocols" do Chris@16: protocols = @repo.checkout_protocols Chris@16: protocols[0].protocol.should eql "Subversion" Chris@16: protocols[1].protocol.should eql "SVN+SSH" Chris@16: protocols[2].protocol.should eql "Root" Chris@16: end Chris@16: end Chris@16: end