Sha256: a4777796a9af62751200201415dc5261da077a5267e98bd24097e23653219090

Contents?: true

Size: 756 Bytes

Versions: 8

Compression:

Stored size: 756 Bytes

Contents

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

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

  let(:configuration) { Etcher.new(<%= configuration.project_namespaced_class %>::Container[:defaults]).call.bind(&:dup) }
  let(:xdg_config) { Runcom::Config.new <%= configuration.project_namespaced_class %>::Container[:defaults_path] }
  let(:kernel) { class_spy Kernel }
  let(:logger) { Cogger.new id: "<%= configuration.project_name %>", io: StringIO.new, level: :debug }

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

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gemsmith-21.4.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-21.3.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-21.2.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-21.1.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-21.0.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-20.7.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-20.6.1 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-20.6.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb