Skip to content

Commit

Permalink
Added RSpec installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jferris committed Mar 3, 2009
1 parent 87fc583 commit 4d32c50
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand All @@ -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.
Expand Down

0 comments on commit 4d32c50

Please sign in to comment.