Skip to content

Commit c0824e3

Browse files
committed
fix: fix tests after Ruby version upgrade
1 parent 146f45e commit c0824e3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
[1.5, {:a=>1, :b=>2}, 1..3, #<Set: {1, 2, 3}>, 1970-01-01 00:00:00 UTC, /ab/, #<struct Point x=5, y=6>, #<OpenStruct foo=7, bar=8>]
1+
[1.5, {a: 1, b: 2}, 1..3, #<Set: {1, 2, 3}>, 1970-01-01 00:00:00 UTC, /ab/, #<struct Point x=5, y=6>, #<OpenStruct foo=7, bar=8>]

test/fixtures/more_types_trace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@
527527
{
528528
"Event": {
529529
"kind": 0,
530-
"content": "1.5\n{:a=>1, :b=>2}\n1..3\n#<Set: {1, 2, 3}>\n1970-01-01 00:00:00 UTC\n/ab/\n#<struct Point x=5, y=6>\n#<OpenStruct foo=7, bar=8>\n",
530+
"content": "1.5\n{a: 1, b: 2}\n1..3\n#<Set: {1, 2, 3}>\n1970-01-01 00:00:00 UTC\n/ab/\n#<struct Point x=5, y=6>\n#<OpenStruct foo=7, bar=8>\n",
531531
"metadata": ""
532532
}
533533
}

test/test_kernel_patches.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,21 +139,21 @@ def test_correct_event_arguments
139139
assert_equal __FILE__, event_p[:path], "Path for p mismatch"
140140
assert_equal expected_line_p_detailed, event_p[:lineno], "Line number for p mismatch"
141141
# p calls inspect on each argument and joins with newline if multiple, but here it's one string then obj
142-
assert_equal "\"detailed_p\"\n{:key=>\"value\", :number=>123}\n", event_p[:content], "Content for p mismatch"
142+
assert_equal "\"detailed_p\"\n{key: \"value\", number: 123}\n", event_p[:content], "Content for p mismatch"
143143

144144

145145
event_puts = @tracer1.events[1]
146146
assert_equal __FILE__, event_puts[:path], "Path for puts mismatch"
147147
assert_equal expected_line_puts_detailed, event_puts[:lineno], "Line number for puts mismatch"
148148
# puts calls to_s on each argument and prints each on a new line
149-
assert_equal "detailed_puts\n{:key=>\"value\", :number=>123}\n", event_puts[:content], "Content for puts mismatch"
149+
assert_equal "detailed_puts\n{key: \"value\", number: 123}\n", event_puts[:content], "Content for puts mismatch"
150150

151151

152152
event_print = @tracer1.events[2]
153153
assert_equal __FILE__, event_print[:path], "Path for print mismatch"
154154
assert_equal expected_line_print_detailed, event_print[:lineno], "Line number for print mismatch"
155155
# print calls to_s on each argument and prints them sequentially
156-
assert_equal "detailed_print{:key=>\"value\", :number=>123}", event_print[:content], "Content for print mismatch"
156+
assert_equal "detailed_print{key: \"value\", number: 123}", event_print[:content], "Content for print mismatch"
157157

158158
CodeTracer::KernelPatches.uninstall(@tracer1)
159159
end

0 commit comments

Comments
 (0)