Skip to content

Commit

Permalink
Make caller_logging spec handle backtrace quoting changes in Ruby 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed May 20, 2024
1 parent e048def commit 116417b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/extensions/caller_logging_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def exec_sql(sql)
@log_stream.rewind
lines = @log_stream.read.split("\n")
lines.length.must_equal 1
lines[0].must_match(/ \(source: #{__FILE__}:#{exec_sql_line}:in `exec_sql'\) SELECT \* FROM items\z/)
lines[0].must_match(/ \(source: #{__FILE__}:#{exec_sql_line}:in [`']exec_sql'\) SELECT \* FROM items\z/)
end

it "should allow formatting of caller information" do
Expand All @@ -37,7 +37,7 @@ def exec_sql(sql)
@log_stream.rewind
lines = @log_stream.read.split("\n")
lines.length.must_equal 1
lines[0].must_match(/ \(source: #{__FILE__}:#{line}:in `block.+\) SELECT \* FROM items\z/)
lines[0].must_match(/ \(source: #{__FILE__}:#{line}:in [`']block.+\) SELECT \* FROM items\z/)
end

it "should not log caller information if all callers lines are filtered" do
Expand Down

0 comments on commit 116417b

Please sign in to comment.