Sha256: 5c8bce6fa2a5f23d4222e4f9f9b40d96ea8535d2d0bed4efe81e4672311d7070
Contents?: true
Size: 814 Bytes
Versions: 22
Compression:
Stored size: 814 Bytes
Contents
module RSpec module Core class Example module ProcsyTransactions def use_transactions? find_metadata(metadata, :transactions) != false end def use_read_transaction? find_metadata(metadata, :read_transaction) != 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
22 entries across 22 versions & 1 rubygems