Skip to content

HTTPS clone URL

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
View
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
end
end
-= 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://github.com/thoughtbot/shoulda.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 => 'http://gems.github.com'
+
+Then require shoulda from your spec/spec_helper.rb file, before Spec::Runner is
+configured:
+
+ # 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}[mailto:tsaleh@thoughtbot.com], and is funded by Thoughtbot[http://www.thoughtbot.com], inc.
Please sign in to comment.
Something went wrong with that request. Please try again.