Skip to content

Commit

Permalink
Merge branch 'increase_test_support'
Browse files Browse the repository at this point in the history
Conflicts:
	package.json
  • Loading branch information
cmeiklejohn committed Sep 11, 2011
2 parents 369f712 + ba0d260 commit fb4e3e2
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 14 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -32,8 +32,8 @@
"nodemon": "~0.5.5"
},
"scripts": {
"test": "vows spec/* --spec",
"test": "vows spec/**/*.js --spec",
"start": "script/server.js"
},
"subdomain": "drip"
}
}
61 changes: 49 additions & 12 deletions spec/controllers/repositories_spec.coffee
Expand Up @@ -9,17 +9,11 @@ vows
.describe('repositories')
.addBatch

'with a repository':
topic: ->
repository = new Repository
name: 'winston'
ownerName: 'indexzero'
repository.save @callback
return
'when creating a new repository': 'pending'

.addBatch

'when creating a new repository': 'pending'

'when deleting repository': 'pending'
'with a repository':

'when requesting the repository list':
topic: (repository) ->
Expand All @@ -33,8 +27,51 @@ vows

'should contain the repository we just created': 'pending'

'when requesting the repository list by name': 'pending'
.addBatch

'with a repository':

'when requesting the repository list by name':
topic: (repository) ->
tobi.get('/repositories/testrepo', @callback)

'should respond with a 200 ok': (response, $) ->
response.should.have.status(200)

'should return a list of repositories': (response, $) ->
response.body.should.be.an.instanceof(Array)

'should contain the repository we just created': 'pending'

'when requesting one repository': 'pending'
.addBatch

'with a repository':
topic: ->
attributes =
name: 'testrepo'
ownerName: 'testuser'
repository = new Repository attributes
repository.save, ->
Repository.findOne attributes, (err, repository) ->
@callback repository
return

'when requesting one repository':
topic: (repository) ->
tobi.get('/repositories/testuser/testrepo', @callback)

'should respond with a 200 ok': (response, $) ->
response.should.have.status(200)

'should return a of repositories': (response, $) ->
response.body.should.be.an.instanceof(Object)

'should contain the repository we just created': 'pending'

.addBatch

'with a repository':

'when deleting repository': 'pending'

.export(module)

0 comments on commit fb4e3e2

Please sign in to comment.