Sha256: b6dbbfbd10c44ce90e3dc3793ea7178c487e76d67a8e2d49c089f25fc24f1a79

Contents?: true

Size: 730 Bytes

Versions: 10

Compression:

Stored size: 730 Bytes

Contents

RSpec.shared_context "with application dependencies" do
<% if settings.build_refinements %>
  using Refinements::Struct
<% end %>

  let(:settings) { <%= settings.project_namespaced_class %>::Container[:settings] }
  let(:logger) { Cogger.new id: "<%= settings.project_name %>", io: StringIO.new, level: :debug }
  let(:io) { StringIO.new }

<% if settings.build_refinements %>
  before do
    settings.merge! Etcher.call(<%= settings.project_namespaced_class %>::Container[:registry].remove_loader(1))
    <%= settings.project_namespaced_class %>::Container.stub! logger:, io:
  end
<% else %>
  before { Demo::Container.stub! logger:, io: }
<% end %>

  after { <%= settings.project_namespaced_class %>::Container.restore }
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gemsmith-22.10.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-22.9.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-22.8.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-22.7.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-22.6.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-22.5.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-22.4.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-22.3.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-22.2.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb
gemsmith-22.1.0 lib/gemsmith/templates/%project_name%/spec/support/shared_contexts/application_dependencies.rb.erb