Sha256: 76d53741809980bb835d6bcc6830ec63c54ce947f08ead710027890f1c4c414e

Contents?: true

Size: 676 Bytes

Versions: 17

Compression:

Stored size: 676 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe Gritano::Repository do
  it 'should have a name' do
    repo = Gritano::Repository.new
    repo.should be_invalid
    repo = Gritano::Repository.new(name: 'tmp/name.git')
    repo.should be_valid
  end
  
  it 'should have a unique name' do
    repo1 = Gritano::Repository.create(name: 'tmp/name.git')
    repo2 = Gritano::Repository.new(name: 'tmp/name.git')
    repo2.should be_invalid
  end
  
  it 'can have a path' do
    repo = Gritano::Repository.new(name: 'name.git', path: 'tmp')
    repo.should be_valid
    repo.save.should be_true
    repo.full_path.should be == 'tmp/name.git'
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
gritano-0.5.3 spec/model_repository_spec.rb
gritano-0.5.2 spec/model_repository_spec.rb
gritano-0.5.1 spec/model_repository_spec.rb
gritano-0.5.0 spec/model_repository_spec.rb
gritano-0.4.1 spec/model_repository_spec.rb
gritano-0.4.0 spec/model_repository_spec.rb
gritano-0.3.2 spec/model_repository_spec.rb
gritano-0.3.0 spec/model_repository_spec.rb
gritano-0.2.2 spec/model_repository_spec.rb
gritano-0.2.1 spec/model_repository_spec.rb
gritano-0.2.0 spec/model_repository_spec.rb
gritano-0.1.7 spec/model_repository_spec.rb
gritano-0.1.6 spec/model_repository_spec.rb
gritano-0.1.5 spec/model_repository_spec.rb
gritano-0.1.4 spec/model_repository_spec.rb
gritano-0.1.3 spec/model_repository_spec.rb
gritano-0.1.2 spec/model_repository_spec.rb