Created
September 17, 2012 20:54
-
-
Save mcculloughsean/3739700 to your computer and use it in GitHub Desktop.
stubbing
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
module.exports = | |
env: process.env.NODE_ENV ? 'development' |
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
config = require './config' | |
module.exports.foo = () -> | |
"We're in #{config.env} environment" |
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
config = require './config' | |
assert config.env, 'development' # true | |
model = require './model' | |
assert "We're in development environment", model.foo() #true | |
config.env = 'production' | |
assert "We're in production environment", model.foo() #true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment