-
Notifications
You must be signed in to change notification settings - Fork 0
environment
To move on from submitting bugs to helping resolve existing issues or contributing your own code to Tower, you must be able to run its test suite. In this section of the guide you'll learn how to set up the tests on your own computer.
First, install Homebrew by following the Homebrew installation instructions (or just paste this into the terminal)
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
XCode 4 is required for git to work.
- Visit the XCode page in the Mac App store
- Click the blue button "View in Mac App store"
- Click the dropdown that says "Free"
It might require you to upgrade your operating system, so either find an older version of XCode or take the time to upgrade. It's better to get the latest version of XCode.
If you don't have git already, it's easy to install
brew install git
brew install node
curl http://npmjs.org/install.sh | sh
brew install mongodb
Then follow the instructions output in the terminal to start mongodb (mongod start
).
brew install redis
Not using Redis yet.
Fork Tower and clone your fork
git clone git://github.com/<username>/tower.git
cd tower
The npm command uses the package-json file to determine and install dependencies similar to the Gemfile for Bundler in Rails. If you stand in the Tower root dir and run npm install
all development dependencies should be installed globally.
tower $ npm install -g
If for some reason that doesn't work, you can install them manually...
$ npm install mocha redis mongodb underscore underscore.logger underscore.string pathfinder async
$ npm install restler chai sinon moment coffeekup mime
Now that you have everything installed and running, time to run the Tower test suite.
npm test
Tower uses Mocha for writing tests.