Sha256: dbe0e133a1b372d0e3ae7e1e0648962888773e43e6b3f32fe8f6bed1d5d76d94

Contents?: true

Size: 738 Bytes

Versions: 12

Compression:

Stored size: 738 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 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

12 entries across 12 versions & 1 rubygems

Version Path
gemsmith-19.6.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-19.5.2 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-19.5.1 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-19.5.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-19.4.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-19.3.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-19.2.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-19.1.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-19.0.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-18.9.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-18.8.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-18.7.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb