diff --git a/spec/dry/types/default_spec.rb b/spec/dry/types/default_spec.rb index fed2c4f9..26763b5f 100644 --- a/spec/dry/types/default_spec.rb +++ b/spec/dry/types/default_spec.rb @@ -216,6 +216,13 @@ context "proc w/o source" do let(:value_constructor) { method(:Integer).to_proc } + before do + # Force the source_location to nil, since this specific object's source_location returns a + # real value since Ruby 3.3: + # ["", 305] + allow(value_constructor).to receive(:source_location) { nil } + end + it "returns string representation of the type" do expect(type.to_s).to eql( "# "\