Sha256: f525a12273c157404b004a9c7ebbcbbd16b9a90280a569b6b0884d09521263d2
Contents?: true
Size: 745 Bytes
Versions: 1
Compression:
Stored size: 745 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gemsmith-18.6.0 | lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb |