Merge branch 'deploy_keys_nonunique' of https://github.com/miks/gitlabhq into miks-deploy_keys_nonunique

Added/fixed specs
Update spec/factory to allow Factory#new without opts

Conflicts:
	app/models/key.rb
This commit is contained in:
Ariejan de Vroom 2012-03-01 16:00:14 +01:00
commit b0ce61c4f2
4 changed files with 65 additions and 8 deletions

View file

@ -10,8 +10,8 @@ class Factory
new(name, opts).tap(&:save!)
end
def new(name, opts)
factory = @factories[name]
def new(name, opts = {})
factory= @factories[name]
factory[0].new.tap do |obj|
factory[1].call(obj)
end.tap do |obj|