Sha256: 54b57d6b183eb92fde8eb254f757f8d84386dda7280cc850be09dec240fcf0eb

Contents?: true

Size: 620 Bytes

Versions: 45

Compression:

Stored size: 620 Bytes

Contents

require 'lhc'
class LHC::Config

  def _cleanup
    @endpoints = {}
    @placeholders = {}
    @interceptors = nil
  end
end

class LHS::Record

  CHILDREN = []

  def self.inherited(child)
    CHILDREN.push(child)
    super
  end

end

RSpec.configure do |config|
  config.before(:each) do |spec|
    next if spec.metadata.key?(:cleanup_before) && spec.metadata[:cleanup_before] == false
    LHC::Config.instance._cleanup
    LHS::Record::Endpoints.all = {}
    LHS::Record::CHILDREN.each do |child|
      child.endpoints = [] if !child.name['LHS']
      child.configuration({}) if !child.name['LHS']
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
lhs-14.5.0 spec/support/cleanup.rb
lhs-14.4.0 spec/support/cleanup.rb
lhs-14.3.4 spec/support/cleanup.rb
lhs-14.3.3 spec/support/cleanup.rb
lhs-14.3.2 spec/support/cleanup.rb
lhs-14.3.1 spec/support/cleanup.rb
lhs-14.3.0 spec/support/cleanup.rb
lhs-14.2.0 spec/support/cleanup.rb
lhs-14.1.1 spec/support/cleanup.rb
lhs-14.1.0 spec/support/cleanup.rb
lhs-14.0.3 spec/support/cleanup.rb
lhs-14.0.2 spec/support/cleanup.rb
lhs-14.0.1 spec/support/cleanup.rb
lhs-14.0.0 spec/support/cleanup.rb
lhs-13.2.3 spec/support/cleanup.rb
lhs-13.2.2 spec/support/cleanup.rb
lhs-13.2.1 spec/support/cleanup.rb
lhs-13.2.0 spec/support/cleanup.rb
lhs-13.1.0 spec/support/cleanup.rb
lhs-13.0.1 spec/support/cleanup.rb