Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error backtrace formatting on Ruby 3.4+ #1771

Merged
merged 6 commits into from
Feb 25, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Tests: use deterministic object logging
orien committed Jan 13, 2025
commit 1258deb25f0383d82814ace5087ab8e78a57a77e
11 changes: 7 additions & 4 deletions spec/cucumber/glue/proto_world_spec.rb
Original file line number Diff line number Diff line change
@@ -68,13 +68,16 @@ module Glue

define_steps do
When('an object is logged') do
log(a: 1, b: 2, c: 3)
object = Object.new
def object.to_s
'<test-object>'
end
log(object)
end
end

it 'attached the string version on the object' do
expected_string = RUBY_VERSION >= '3.4' ? '{a: 1, b: 2, c: 3}' : '{:a=>1, :b=>2, :c=>3}'
expect(@out.string).to include expected_string
it 'prints the stringified version of the object as a log message' do
expect(@out.string).to include('<test-object>')
end
end