Sha256: 6dff6279b75b1fecce8f1355d0345a629fdc07dced5a79e5bfaf79f860d9bac8

Contents?: true

Size: 746 Bytes

Versions: 9

Compression:

Stored size: 746 Bytes

Contents

require "dry/container/stub"
require "auto_injector/stub"

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

  include_context "with temporary directory"

  let(:configuration) { <%= configuration.project_namespaced_class %>::Configuration::Loader.with_defaults.call }
  let(:kernel) { class_spy Kernel }

  let :logger do
    Cogger::Client.new Logger.new(StringIO.new),
                       formatter: ->(_severity, _name, _at, message) { "#{message}\n" }
  end

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

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gemsmith-18.5.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-18.4.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-18.3.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-18.2.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-18.1.1 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-18.1.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-18.0.2 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-18.0.1 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-18.0.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb