Sha256: 20d7342ff00e35fab0a4e98732d20ab8754ca0e40db127825e3ade8280be6797
Contents?: true
Size: 632 Bytes
Versions: 16
Compression:
Stored size: 632 Bytes
Contents
module PaperTrail module RSpec module Helpers module InstanceMethods # enable versioning for specific blocks (at instance-level) def with_versioning was_enabled = ::PaperTrail.enabled? ::PaperTrail.enabled = true yield ensure ::PaperTrail.enabled = was_enabled end end module ClassMethods # enable versioning for specific blocks (at class-level) def with_versioning(&block) context 'with versioning', :versioning => true do class_exec(&block) end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems