Explicitly requiring rspec/core and rspec/matchers on the RSpec helper to ensure the libraries have been loaded before the helper code is run. Fix #261

This commit is contained in:
Ben Atkins 2013-08-28 10:29:25 -04:00
parent fdf85343a8
commit 94f1155286
3 changed files with 5 additions and 2 deletions

View File

@ -3,13 +3,14 @@
- [#224](https://github.com/airblade/paper_trail/issues/224)/[#236](https://github.com/airblade/paper_trail/pull/236) -
Fixed compatibility with [ActsAsTaggableOn](https://github.com/mbleigh/acts-as-taggable-on).
- [#235](https://github.com/airblade/paper_trail/pull/235) - Dropped unnecessary secondary sort on `versions` association.
- [#216](https://github.com/airblade/paper_trail/pull/216) - Added helper & extension for [RSpec](https://github.com/rspec/rspec),
and helper for [Cucumber](http://cukes.info).
- [#212](https://github.com/airblade/paper_trail/pull/212) - Added `PaperTrail::Cleaner` module, useful for discarding draft versions.
- [#207](https://github.com/airblade/paper_trail/issues/207) - Versions for `'create'` events are now created with `create!` instead of
`create` so that an exception gets raised if it is appropriate to do so.
- [#199](https://github.com/airblade/paper_trail/pull/199) - Rails 4 compatibility.
- [#165](https://github.com/airblade/paper_trail/pull/165) - Namespaced the version class under the `PaperTrail` module.
- [#119](https://github.com/airblade/paper_trail/issues/119) - Support for [Sinatra](http://www.sinatrarb.com/); decoupled gem from `Rails`.
## 2.7.2

View File

@ -845,7 +845,7 @@ You may want to turn PaperTrail off to speed up your tests. See the [Turning Pa
PaperTrail provides a helper that works with RSpec to make it easier to control when `PaperTrail` during testing. By default, PaperTrail will be
turned off for all tests. When you wish to enable PaperTrail for a test you can either wrap the test in a `with_versioning` block, or pass
in `:versioning => true` option to a test block, like so:
in `:versioning => true` option to a spec block, like so:
```ruby
describe "RSpec test group" do

View File

@ -1,4 +1,6 @@
if defined? RSpec
require 'rspec/core'
require 'rspec/matchers'
require File.expand_path('../rspec/extensions', __FILE__)
RSpec.configure do |config|