Sha256: 4e8be6df298792e7448cce0a4ca0c1775209e4e9886f9eff294bdb1e66b0c29c

Contents?: true

Size: 439 Bytes

Versions: 14

Compression:

Stored size: 439 Bytes

Contents

RSpec.describe Dry::Container do
  let(:klass) { Dry::Container }
  let(:container) { klass.new }

  it_behaves_like 'a container'

  describe 'inheritance' do
    it 'sets up a container for a child class' do
      parent = Class.new { extend Dry::Container::Mixin }
      child = Class.new(parent)

      parent.register(:foo, 'foo')
      child.register(:foo, 'foo')

      expect(parent[:foo]).to_not be(child[:foo])
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/dry-container-0.7.2/spec/integration/container_spec.rb
dry-container-0.7.2 spec/integration/container_spec.rb
dry-container-0.7.1 spec/integration/container_spec.rb
dry-container-0.7.0 spec/integration/container_spec.rb
dry-container-0.6.0 spec/integration/container_spec.rb
dry-container-0.5.0 spec/integration/container_spec.rb
dry-container-0.4.0 spec/integration/container_spec.rb
dry-container-0.3.4 spec/integration/container_spec.rb
dry-container-0.3.3 spec/integration/container_spec.rb
dry-container-0.3.2 spec/integration/container_spec.rb
dry-container-0.3.1 spec/integration/container_spec.rb
dry-container-0.3.0 spec/integration/container_spec.rb
dry-container-0.2.8 spec/integration/container_spec.rb
dry-container-0.2.7 spec/integration/container_spec.rb