Sha256: 38279ec4a3b91d73270f6b40c0f0c33e39be396325726fccc9da079f506629d8

Contents?: true

Size: 685 Bytes

Versions: 26

Compression:

Stored size: 685 Bytes

Contents

# before hook for Cucumber
Before do
  PaperTrail.enabled = false
  PaperTrail.enabled_for_controller = true
  PaperTrail.whodunnit = nil
  PaperTrail.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

26 entries across 25 versions & 2 rubygems

Version Path
paper_trail-8.1.2 lib/paper_trail/frameworks/cucumber.rb
paper_trail-8.1.1 lib/paper_trail/frameworks/cucumber.rb
paper_trail-8.1.0 lib/paper_trail/frameworks/cucumber.rb
paper_trail-8.0.1 lib/paper_trail/frameworks/cucumber.rb
paper_trail-8.0.0 lib/paper_trail/frameworks/cucumber.rb
paper_trail-7.1.3 lib/paper_trail/frameworks/cucumber.rb
paper_trail-7.1.2 lib/paper_trail/frameworks/cucumber.rb
paper_trail-7.1.1 lib/paper_trail/frameworks/cucumber.rb
paper_trail-7.1.0 lib/paper_trail/frameworks/cucumber.rb
paper_trail-7.0.3 lib/paper_trail/frameworks/cucumber.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paper_trail-5.2.3/lib/paper_trail/frameworks/cucumber.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paper_trail-7.0.2/lib/paper_trail/frameworks/cucumber.rb
paper_trail-7.0.2 lib/paper_trail/frameworks/cucumber.rb
paper_trail-7.0.1 lib/paper_trail/frameworks/cucumber.rb
paper_trail-7.0.0 lib/paper_trail/frameworks/cucumber.rb
paper_trail-6.0.2 lib/paper_trail/frameworks/cucumber.rb
paper_trail-6.0.1 lib/paper_trail/frameworks/cucumber.rb
paper_trail-6.0.0 lib/paper_trail/frameworks/cucumber.rb
paper_trail-5.2.3 lib/paper_trail/frameworks/cucumber.rb
paper_trail-5.2.2 lib/paper_trail/frameworks/cucumber.rb