Sha256: 9381fbab1030ceaa1c532598ff4c742db98280c90f81d25d867c4d30c10d2663

Contents?: true

Size: 397 Bytes

Versions: 2

Compression:

Stored size: 397 Bytes

Contents

if defined? World
  module RspecPaperTrailCucumberSupport
    # :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
  World(RspecPaperTrailCucumberSupport
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rspec-paper_trail-0.0.9 lib/rspec/paper_trail/features_support.rb
rspec-paper_trail-0.0.8 lib/rspec/paper_trail/features_support.rb