Module: PaperTrail::Cucumber::Extensions

Defined in:
lib/mongo_trails/frameworks/cucumber.rb

Overview

Helper method for enabling PT in Cucumber features.

Instance Method Summary collapse

Instance Method Details

#with_versioningObject

:call-seq: with_versioning

enable versioning for specific blocks



20
21
22
23
24
25
26
27
28
# File 'lib/mongo_trails/frameworks/cucumber.rb', line 20

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