Sha256: 1cc2ae722ffa4f5cfe3c3993f8f4677bf7460ae3a1a5bf9e35e1a99e8d405f00

Contents?: true

Size: 649 Bytes

Versions: 22

Compression:

Stored size: 649 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'] && defined?(child.endpoints)
      child.configuration({}) if !child.name['LHS']
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
lhs-15.3.1 spec/support/cleanup.rb
lhs-15.3.1.pre.fixlhc.1 spec/support/cleanup.rb
lhs-15.3.0 spec/support/cleanup.rb
lhs-15.2.5 spec/support/cleanup.rb
lhs-15.2.4 spec/support/cleanup.rb
lhs-15.2.3 spec/support/cleanup.rb
lhs-15.2.3.pre.favorites.1 spec/support/cleanup.rb
lhs-15.2.2.pre.favorites.1 spec/support/cleanup.rb
lhs-15.2.2 spec/support/cleanup.rb
lhs-15.2.1 spec/support/cleanup.rb
lhs-15.2.0 spec/support/cleanup.rb
lhs-15.1.1 spec/support/cleanup.rb
lhs-15.1.0 spec/support/cleanup.rb
lhs-15.0.2 spec/support/cleanup.rb
lhs-15.0.1 spec/support/cleanup.rb
lhs-15.0.0 spec/support/cleanup.rb
lhs-14.6.5 spec/support/cleanup.rb
lhs-14.6.4 spec/support/cleanup.rb
lhs-14.6.3 spec/support/cleanup.rb
lhs-14.6.2 spec/support/cleanup.rb