Sha256: 3f29299669dc455d65dcfe218a6e529705f2e06c969b9856baad42d9d4904389

Contents?: true

Size: 583 Bytes

Versions: 3

Compression:

Stored size: 583 Bytes

Contents

# frozen_string_literal: true

RSpec.describe Dry::System::Rails::Railtie do
  subject(:railtie) do
    Dry::System::Rails::Railtie.instance
  end

  describe '.finalize!' do
    it 'reloads container and import module' do
      Dummy::Container.register('foo', Object.new)

      Rails.application.reloader.reload!

      expect(Dummy::Container.keys).to_not include('foo')

      klass = Class.new do
        include Dummy::Import['operations.create_user']
      end

      obj = klass.new

      expect(obj.create_user).to be_instance_of(Operations::CreateUser)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dry-system-rails-0.3.1 spec/integration/railtie_spec.rb
dry-system-rails-0.3.0 spec/integration/railtie_spec.rb
dry-system-rails-0.2.0 spec/integration/railtie_spec.rb