Sha256: a7b396e311d9c3b54568b7be0c32779c2348fec4f616a1dec0f5df2b88ffba42

Contents?: true

Size: 524 Bytes

Versions: 4

Compression:

Stored size: 524 Bytes

Contents

RSpec.describe 'Lazy-loading manual registration files' do
  before do
    module Test
      class Container < Dry::System::Container
        configure do |config|
          config.root = SPEC_ROOT.join('fixtures/manual_registration').realpath
        end

        load_paths!('lib')
      end
    end
  end

  it 'loads a manual registration file if the component could not be found' do
    expect(Test::Container['foo.special']).to be_a(Test::Foo)
    expect(Test::Container['foo.special'].name).to eq "special"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dry-system-0.7.3 spec/integration/container/lazy_loading/manual_registration_spec.rb
dry-system-0.7.2 spec/integration/container/lazy_loading/manual_registration_spec.rb
dry-system-0.7.1 spec/integration/container/lazy_loading/manual_registration_spec.rb
dry-system-0.7.0 spec/integration/container/lazy_loading/manual_registration_spec.rb