[Rspec-devel] RSpec on Rails

Lachie lachiec at gmail.com
Thu Jun 1 00:47:40 EDT 2006


Hi everyone,
I've been working on an RSpec plugin for rails

Its a joy.

http://lachie.info/svn/projects/rails_plugins/rspec_on_rails/README

Features:
* minimal impact on RSpec - overwrites Spec::Runner::Context#run, adds
to Context, Specification and ExecutionContext
* pragmatic - only supports what I (and my contributor :) have needed so far
* mashes in rails' fixture loading - I only use yaml
* mashes in rails' test controller setup
* mashes in much of zenspider's Test::Rails::ControllerTestCase
* can automatically load the Controller for verification.
* many of rails' custom, crufty asserts aren't even needed with the
beauty of "should"
* provides rake tasks for running specs
* uses the plugin install hook to create a spec directory, including
the spec_helper required to use the rails features
* its a plugin, so the barrier of using it in a rails app is very low.

AntiFeatures:
* pragmatic - only supports what I (and my contributor :) have needed so far
* opportunistic - lots of snatch-n-grab code from Rails and Zenspider
source. I blame the tightly coupled design of the original code, of
course.

However, it does bring RSpec to Rails. My recent apps have received a
dose of RSpec goodness, and both I and the apps have benefitted
immensely from the experience.

Is anyone actively pimping RSpec? I've talked to fellow Rails/Ruby
devs who've never heard of it!

Lachie
http://lachie.info/
http://www.flickr.com/photos/lachie/


More information about the Rspec-devel mailing list