Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
More concise controller spec macros, with an included 'rspecific_scaffold' generator.
Ruby
tree: 749e890d4b

README.rdoc

RSpecific

Make RSpec Rails a bit more concise (especially with regard to controller specs).

This is my ongoing work to shorten the amount of text written in a spec.

Installation

Install the plugin:

script/plugin install git://github.com/martinemde/rspecific.git

Then add the controller (and maybe the model) methods to the configure block in spec_helper.rb

Spec::Runner.configure do |config|
  config.extend Rspecific::ControllerExampleGroupMethods, :type => :controller
  config.extend Rspecific::ModelExampleGroupMethods,      :type => :model

Using it

Generate a scaffold by running script/generate with the rspecific_scaffold generator.

script/generate rspecific_scaffold model_name

You can also adapt any of your existing specs to use the new methods.

Credit

This is almost entirely the work of technoweenie (Rick Olson) with some additional tweaking and maintaining by me.

Something went wrong with that request. Please try again.