Thursday, March 01, 2012

Autotest on Ubuntu 11.10 running Rails 3.2

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."
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:
Then, I simply ran autotest from my rails app directory:
$ 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:

Anonymous said...

Awesome Mark, thanks so much for this post!