Skip to content

Commit

Permalink
Fix test for Ruby 3.3
Browse files Browse the repository at this point in the history
This test relied on an assumption that is no longer true in 3.3.
  • Loading branch information
timriley committed Jan 5, 2024
1 parent b37b48c commit f611e5b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/dry/types/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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:
# ["<internal:kernel>", 305]
allow(value_constructor).to receive(:source_location) { nil }
end

it "returns string representation of the type" do
expect(type.to_s).to eql(
"#<Dry::Types[Default<Nominal<String> "\
Expand Down

0 comments on commit f611e5b

Please sign in to comment.