Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added RSpec installation instructions

  • Loading branch information...
commit 4d32c506f71b8687446f9571d7b9afd2f2dece7c 1 parent 87fc583
@jferris jferris authored
Showing with 24 additions and 2 deletions.
  1. +24 −2 README.rdoc
26 README.rdoc
@@ -2,7 +2,7 @@
Shoulda makes it easy to write elegant, understandable, and maintainable tests. Shoulda consists of test macros, assertions, and helpers added on to the Test::Unit framework. It's fully compatible with your existing tests, and requires no retooling to use.
-Helpers:: #context and #should give you rSpec like test blocks.
+Helpers:: #context and #should give you RSpec like test blocks.
In addition, you get nested contexts and a much more readable syntax.
Macros:: Generate hundreds of lines of Controller and ActiveRecord tests with these powerful macros.
They get you started quickly, and can help you ensure that your application is conforming to best practices.
@@ -111,7 +111,7 @@ Any *.rb file under RAILS_ROOT/test/shoulda_macros/ or vendor/(plugins|gems)/gem
-= Rails Installation
+= Rails Installation (Test::Unit)
=== As a Gem
@@ -138,6 +138,28 @@ Use this if you prefer the idea of being able to easily switch between using edg
$ git submodule add git:// vendor/plugins/shoulda
+= Rails Installation (RSpec)
+We recommend that you add config.gem lines for RSpec and Shoulda in your
+config/environment/test.rb file, but do not ask Rails to load the RSpec and
+Shoulda libraries:
+ config.gem 'rspec', :lib => false
+ config.gem 'rspec-rails', :lib => false
+ config.gem 'thoughtbot-shoulda',
+ :lib => false,
+ :source => ''
+Then require shoulda from your spec/spec_helper.rb file, before Spec::Runner is
+ # requires for RSpec
+ require 'shoulda'
+ Spec::Runner.configure do |config|
+ # ...
+You should not need to require anything besides the top-level shoulda library.
= Credits
Shoulda is maintained by {Tammer Saleh}[], and is funded by Thoughtbot[], inc.
Please sign in to comment.
Something went wrong with that request. Please try again.