From 0c42ac3c4e0de8787ecc73f4f5512a74a8f607ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Busqu=C3=A9?= Date: Tue, 14 Nov 2023 11:34:59 +0100 Subject: [PATCH] Test Zeitwerk setup By eager loading in a test example we can see the loader is setup correctly. This has been adapted to RSpec from Zeitwerk's README about testing compliance [1]. [1] - https://github.com/fxn/zeitwerk#testing-compliance --- spec/unit/operation_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/unit/operation_spec.rb b/spec/unit/operation_spec.rb index 8e91252..e6fe0eb 100644 --- a/spec/unit/operation_spec.rb +++ b/spec/unit/operation_spec.rb @@ -5,6 +5,12 @@ RSpec.describe Dry::Operation do include Dry::Monads[:result] + it "configures loader" do + expect do + described_class.loader.eager_load(force: true) + end.not_to raise_error + end + describe "#steps" do it "wraps block's return value in a Success" do klass = Class.new(described_class) do