Here’s a nice little enhancement in Spec::Rails-0.9.

Up until now, controller examples required that the controller be named:

#the old way
context "Login Controller" do
  controller_name :login
  ...

You’ll still be able to do that, but you’ll also be able to do this:

describe LoginController do
  ...

... and Spec::Rails will assume that LoginController is what you want to use.

This works for your helper examples as well:

describe PeopleHelper do
  ...

Leave a Reply (Textile Enabled)