From 8259f35adc67ab34bb521f0e8a298fb00629b958 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Thu, 15 Feb 2024 13:00:32 +0900 Subject: ruby-spec: Accept both a backtick and a single quote in error messages --- spec/ruby/core/exception/full_message_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec/ruby/core/exception/full_message_spec.rb') diff --git a/spec/ruby/core/exception/full_message_spec.rb b/spec/ruby/core/exception/full_message_spec.rb index 4fad369936..5154354555 100644 --- a/spec/ruby/core/exception/full_message_spec.rb +++ b/spec/ruby/core/exception/full_message_spec.rb @@ -42,7 +42,7 @@ describe "Exception#full_message" do e = RuntimeError.new("Some runtime error") e.backtrace.should == nil full_message = e.full_message(highlight: false, order: :top).lines - full_message[0].should.start_with?("#{__FILE__}:#{__LINE__-1}:in `") + full_message[0].should.start_with?("#{__FILE__}:#{__LINE__-1}:in ") full_message[0].should.end_with?("': Some runtime error (RuntimeError)\n") end @@ -94,7 +94,7 @@ describe "Exception#full_message" do line = __LINE__; raise "first line\nsecond line" rescue => e full_message = e.full_message(highlight: false, order: :top).lines - full_message[0].should.start_with?("#{__FILE__}:#{line}:in `") + full_message[0].should.start_with?("#{__FILE__}:#{line}:in ") full_message[0].should.end_with?(": first line (RuntimeError)\n") full_message[1].should == "second line\n" end @@ -105,7 +105,7 @@ describe "Exception#full_message" do line = __LINE__; raise "first line\nsecond line\nthird line" rescue => e full_message = e.full_message(highlight: true, order: :top).lines - full_message[0].should.start_with?("#{__FILE__}:#{line}:in `") + full_message[0].should.start_with?("#{__FILE__}:#{line}:in ") full_message[0].should.end_with?(": \e[1mfirst line (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n") full_message[1].should == "\e[1msecond line\e[m\n" full_message[2].should == "\e[1mthird line\e[m\n" -- cgit v1.2.3