Skip to content

Instantly share code, notes, and snippets.

@csquared
Created September 21, 2012 02:05
Show Gist options
  • Save csquared/3759389 to your computer and use it in GitHub Desktop.
Save csquared/3759389 to your computer and use it in GitHub Desktop.
Simple Coffeescript Bootstrap test with vows and api-easy
APIEasy = require('api-easy')
assert = require('assert')
process.env.NODE_DEBUG = true
process.env.NODE_ENV = 'test'
process.env.PORT = 8080
process.env.DATABASE_URL = process.env.TEST_DATABASE_URL
app = require('../app')
suite = APIEasy.describe("api")
suite.discuss("When using the awesome api")
.use('localhost', 8080)
.get('/')
.expect(200, {ok: true})
.setHeader('Content-Type', 'application/json')
.post('/', {ok: "test"})
.expect(200, {ok: true})
.expect("something else", (err, resp, body) ->)
.export(module)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment