Sha256: 6be5a5ee3771e0bf42a40f6d3de051070c8a44d01fca7920e7a0b409d73f09b8

Contents?: true

Size: 705 Bytes

Versions: 16

Compression:

Stored size: 705 Bytes

Contents

module RSpec
  module Core
    class Example
      module ProcsyTransactions
        def use_transactions?
          find_metadata(metadata, :transactions) != false
        end

        def find_metadata(hash, key)
          return unless hash.is_a? Hash
          if hash.key? key
            hash[key]
          elsif hash.key? :example_group
            find_metadata(hash[:example_group], key)
          end
        end
      end

      if not defined? Procsy or Procsy.class == Module
        # RSpec version >= '2.5.0'
        module Procsy
          include ProcsyTransactions
        end
      else
        class Procsy
          include ProcsyTransactions
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
pacer-1.4.2-java spec/support/use_transactions.rb
pacer-1.4.1-java spec/support/use_transactions.rb
pacer-1.4.0-java spec/support/use_transactions.rb
pacer-1.3.5-java spec/support/use_transactions.rb
pacer-1.3.4-java spec/support/use_transactions.rb
pacer-1.3.3-java spec/support/use_transactions.rb
pacer-1.3.2-java spec/support/use_transactions.rb
pacer-1.3.1-java spec/support/use_transactions.rb
pacer-1.2.0-java spec/support/use_transactions.rb
pacer-1.1.1-java spec/support/use_transactions.rb
pacer-1.1.0-java spec/support/use_transactions.rb
pacer-1.0.3-java spec/support/use_transactions.rb
pacer-1.0.2-java spec/support/use_transactions.rb
pacer-1.0.1-java spec/support/use_transactions.rb
pacer-1.0.0-java spec/support/use_transactions.rb
pacer-0.9.1.1-java spec/support/use_transactions.rb