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-13.0.0 spec/support/cleanup.rb
lhs-12.3.0 spec/support/cleanup.rb
lhs-12.2.1 spec/support/cleanup.rb
lhs-12.2.0 spec/support/cleanup.rb
lhs-12.1.0 spec/support/cleanup.rb
lhs-12.0.3 spec/support/cleanup.rb
lhs-12.0.2 spec/support/cleanup.rb
lhs-12.0.1 spec/support/cleanup.rb
lhs-12.0.0 spec/support/cleanup.rb
lhs-11.3.3 spec/support/cleanup.rb
lhs-11.3.2 spec/support/cleanup.rb
lhs-11.3.1 spec/support/cleanup.rb
lhs-11.3.0 spec/support/cleanup.rb
lhs-11.2.2 spec/support/cleanup.rb
lhs-11.2.1 spec/support/cleanup.rb
lhs-11.2.0 spec/support/cleanup.rb
lhs-11.1.0 spec/support/cleanup.rb
lhs-11.0.3 spec/support/cleanup.rb
lhs-11.0.2 spec/support/cleanup.rb
lhs-11.0.1 spec/support/cleanup.rb