I’m reading and working through Ruby on Rails Tutorial from Michael Hartl. The book rightly promotes a "test first" approach. In this Hartl mentions autotest. As the text mentions, "configuring it can be a bit tricky."
Then, I simply ran autotest from my rails app directory:
Here are the steps I used to get autotest working on my Ubuntu 11.10 OS running Rails 3.2.0.rc2:
$ gem install autotest
$ gem install autotest-rails-pure
$ sudo apt-get install libnotify-bin
$ gem install autotest-notification
Next, I added the ~/.autotest file:
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
# ~.autotest | |
require 'rubygems' | |
require 'autotest_notification' | |
SPEAKING = false | |
DOOM_EDITION = false | |
BUUF = false | |
PENDING = false | |
STICKY = false | |
SUCCESS_SOUND = '' | |
FAILURE_SOUND = '' |
$ rails-apps/myapp autotest
This is nice in that I do not have to manually run the rspec tests as autotest runs each time I change a test file or the tested implementation code.
1 comment:
Awesome Mark, thanks so much for this post!
Post a Comment