Sha256: f9d140384e1c622575a57a3a308ad2931ebc4dbd9fa83d71df073d3b2a2cc943

Contents?: true

Size: 644 Bytes

Versions: 2

Compression:

Stored size: 644 Bytes

Contents

require "dry/container/stub"
require "infusible/stub"

RSpec.shared_context "with application dependencies" do
  using Refinements::Structs
  using Infusible::Stub

  include_context "with temporary directory"

  let(:configuration) { <%= configuration.project_namespaced_class %>::Configuration::Loader.with_defaults.call }
  let(:kernel) { class_spy Kernel }
  let(:logger) { Cogger.new io: StringIO.new, formatter: :emoji }

  before { <%= configuration.project_namespaced_class %>::Import.stub configuration:, kernel:, logger: }

  after { <%= configuration.project_namespaced_class %>::Import.unstub :configuration, :kernel, :logger }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gemsmith-19.8.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-19.7.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb