Skip to content

Commit 6108f92

Browse files
committed
fix: Update xray_cause_test for Ruby 3.4+ backtrace format
Ruby 3.4+ changed backtrace label from 'method_name' to 'ClassName#method_name'. Use assert_includes to handle both formats.
1 parent 6e2c8ce commit 6108f92

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/unit/xray_cause_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_xray_cause
2525
assert_true under_test.instance_variable_get(:@cause)[:exceptions][0][:stack].count.positive?
2626
assert_equal __FILE__, under_test.instance_variable_get(:@cause)[:exceptions][0][:stack][0][:path]
2727
assert_kind_of Integer, under_test.instance_variable_get(:@cause)[:exceptions][0][:stack][0][:line]
28-
assert_equal __method__.to_s, under_test.instance_variable_get(:@cause)[:exceptions][0][:stack][0][:label]
28+
assert_includes under_test.instance_variable_get(:@cause)[:exceptions][0][:stack][0][:label], __method__.to_s
2929
end
3030

3131
def test_stack_depth_maximum

0 commit comments

Comments
 (0)