Created
December 2, 2013 10:03
-
-
Save nicolaracco/7747397 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app.coffee | |
require 'express' | |
class Server | |
constructor: -> | |
@app = express() | |
@server = http.createServer(@app) | |
@io = SocketIO.listen @server, logger: @logger | |
@configure_app() | |
start: (done) => | |
@server.listen 3000 | |
done?() | |
stop: (done) => | |
@server.stop done | |
configure_app: => | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# spec/requests/login_page_spec.coffee | |
Server = require '../../app' | |
describe 'Login Page', -> | |
beforeAll (done) -> | |
@server = new Server | |
@server.start done | |
... | |
afterAll (done) -> | |
@server.stop done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment