Sha256: cd8c95307b5c18934f074be6d24046e4f6a7a560df80d0b3e26bf0b5bb6fc1fe
Contents?: true
Size: 692 Bytes
Versions: 2
Compression:
Stored size: 692 Bytes
Contents
require 'rspec/core' require 'rspec/matchers' require File.expand_path('../rspec/extensions', __FILE__) RSpec.configure do |config| config.include ::PaperTrail::RSpec::Extensions config.before(:each) do ::PaperTrail.enabled = false ::PaperTrail.enabled_for_controller = true ::PaperTrail.whodunnit = nil ::PaperTrail.controller_info = {} if defined?(::Rails) && defined?(::RSpec::Rails) end config.before(:each, :versioning => true) do ::PaperTrail.enabled = true end end RSpec::Matchers.define :be_versioned do # check to see if the model has `has_paper_trail` declared on it match { |actual| actual.kind_of?(::PaperTrail::Model::InstanceMethods) } end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
paper_trail-3.0.0 | lib/paper_trail/frameworks/rspec.rb |
paper_trail-3.0.0.rc2 | lib/paper_trail/frameworks/rspec.rb |