Skip to content

Commit eb5338d

Browse files
Test Zeitwerk setup (#13)
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
1 parent d8813a8 commit eb5338d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/unit/operation_spec.rb

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
RSpec.describe Dry::Operation do
66
include Dry::Monads[:result]
77

8+
it "configures loader" do
9+
expect do
10+
described_class.loader.eager_load(force: true)
11+
end.not_to raise_error
12+
end
13+
814
describe "#steps" do
915
it "wraps block's return value in a Success" do
1016
klass = Class.new(described_class) do

0 commit comments

Comments
 (0)