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
// Setup basic express server | |
var express = require('express'); | |
var app = express(); | |
// Spool up server | |
var server = app.listen(app.get('port'), function() { | |
console.log('App listening on port %d', app.get('port')); | |
}); | |
// Import socket_api |
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
require 'spec_helper' | |
describe User do | |
it "should create a new user given a username" do | |
User.create!(:username => "rmcenroe") | |
end | |
it "should not create a new user given a bad username" do | |
bad_user = User.new(:username => "not_real") | |
bad_user.should_not be_valid |