Skip to content

Commit

Permalink
Update spec for 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
flash-gordon committed Jan 5, 2025
1 parent 348e902 commit af24acb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/dry/types/implication_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@
end

it "raises ArgumentError when non of the types have a valid input" do
expect { type.success({id: "id"}) }.to raise_error(ArgumentError, /Invalid success value '{:id=>"id"}' /)
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.4.0")
expect { type.success({id: "id"}) }.to raise_error(ArgumentError, /Invalid success value '{id: "id"}'/)
else
expect { type.success({id: "id"}) }.to raise_error(ArgumentError, /Invalid success value '\{:id=>"id"\}':/)
end
end
end

Expand Down

0 comments on commit af24acb

Please sign in to comment.