Module: PaperTrail::RSpec::Helpers::InstanceMethods

Defined in:
lib/mongo_trails/frameworks/rspec/helpers.rb

Overview

Included in the RSpec configuration in ‘frameworks/rspec.rb`

Instance Method Summary collapse

Instance Method Details

#with_versioningObject

enable versioning for specific blocks (at instance-level)



9
10
11
12
13
14
15
# File 'lib/mongo_trails/frameworks/rspec/helpers.rb', line 9

def with_versioning
  was_enabled = ::PaperTrail.enabled?
  ::PaperTrail.enabled = true
  yield
ensure
  ::PaperTrail.enabled = was_enabled
end