Sha256: 4fd83820db190f0c18e989634312584affc136b5cd23ff865eb05be6d31dc52a
Contents?: true
Size: 767 Bytes
Versions: 26
Compression:
Stored size: 767 Bytes
Contents
module PaperTrail module RSpec module Helpers # Included in the RSpec configuration in `frameworks/rspec.rb` 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 # Extended by the RSpec configuration in `frameworks/rspec.rb` 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
26 entries across 25 versions & 2 rubygems