Sha256: eb04fef93a4362b5074935a913b464dc373382d356fa498a3750ef414e93ecbb
Contents?: true
Size: 1.17 KB
Versions: 17
Compression:
Stored size: 1.17 KB
Contents
RSpec.describe "Container / Standard providers / Rack", :app_integration do specify "Rack provider is loaded when rack is bundled" do with_tmp_directory(Dir.mktmpdir) do write "config/app.rb", <<~RUBY require "hanami" module TestApp class App < Hanami::App end end RUBY write "slices/main/.keep", "" require "hanami/prepare" expect(Hanami.app["rack.monitor"]).to be_a_kind_of(Dry::Monitor::Rack::Middleware) expect(Main::Slice["rack.monitor"]).to be_a_kind_of(Dry::Monitor::Rack::Middleware) end end specify "Rack provider is not loaded when rack is not bundled" do allow(Hanami).to receive(:bundled?).and_call_original allow(Hanami).to receive(:bundled?).with("rack").and_return false with_tmp_directory(Dir.mktmpdir) do write "config/app.rb", <<~RUBY require "hanami" module TestApp class App < Hanami::App end end RUBY write "slices/main/.keep", "" require "hanami/prepare" expect(Hanami.app.key?("rack.monitor")).to be false expect(Main::Slice.key?("rack.monitor")).to be false end end end
Version data entries
17 entries across 17 versions & 1 rubygems