summaryrefslogtreecommitdiff
path: root/spec/ruby/core/exception/full_message_spec.rb
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2024-02-15 13:00:32 +0900
committerYusuke Endoh <mame@ruby-lang.org>2024-02-15 18:42:31 +0900
commit8259f35adc67ab34bb521f0e8a298fb00629b958 (patch)
treeb7ddb8c804334616362def40f380a29b3ffca6ea /spec/ruby/core/exception/full_message_spec.rb
parent25d74b9527cd525042ad0b612b794fa331d3a318 (diff)
ruby-spec: Accept both a backtick and a single quote in error messages
Diffstat (limited to 'spec/ruby/core/exception/full_message_spec.rb')
-rw-r--r--spec/ruby/core/exception/full_message_spec.rb6
1 files changed, 3 insertions, 3 deletions
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"