mirror of
https://github.com/thoughtbot/shoulda-matchers.git
synced 2022-11-09 12:01:38 -05:00
Added RSpec installation instructions
This commit is contained in:
parent
87fc583d1e
commit
4d32c506f7
1 changed files with 24 additions and 2 deletions
26
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
|
|||
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.
|
||||
|
|
Loading…
Reference in a new issue