Sha256: 566476c332dce2e5ac8a9d53213962386512db763f3112bfcbf4edc01cfbc4ad
Contents?: true
Size: 728 Bytes
Versions: 27
Compression:
Stored size: 728 Bytes
Contents
# frozen_string_literal: true # before hook for Cucumber Before do PaperTrail.enabled = false PaperTrail.request.enabled = true PaperTrail.request.whodunnit = nil PaperTrail.request.controller_info = {} if defined?(::Rails) end module PaperTrail module Cucumber # Helper method for enabling PT in Cucumber features. module Extensions # :call-seq: # with_versioning # # enable versioning for specific blocks def with_versioning was_enabled = ::PaperTrail.enabled? ::PaperTrail.enabled = true begin yield ensure ::PaperTrail.enabled = was_enabled end end end end end World PaperTrail::Cucumber::Extensions
Version data entries
27 entries across 27 versions & 3 rubygems