diff --git a/spec/commands/wtf_spec.rb b/spec/commands/wtf_spec.rb index 52ad02514..c4af0cc52 100644 --- a/spec/commands/wtf_spec.rb +++ b/spec/commands/wtf_spec.rb @@ -38,7 +38,7 @@ it "prints only a part of the exception backtrace" do subject.process expect(subject.output.string).to eq( - "\e[1mException:\e[0m RuntimeError: oops\n" \ + "\001\e[1m\002Exception:\001\e[0m\002 RuntimeError: oops\n" \ "--\n" \ "0: /bin/pry:23:in `
'\n" \ "1: /bin/pry:23:in `
'\n" \ @@ -55,7 +55,7 @@ it "prints full exception backtrace" do subject.process expect(subject.output.string).to eq( - "\e[1mException:\e[0m RuntimeError: oops\n" \ + "\001\e[1m\002Exception:\001\e[0m\002 RuntimeError: oops\n" \ "--\n" \ "0: /bin/pry:23:in `
'\n" \ "1: /bin/pry:23:in `
'\n" \ @@ -73,7 +73,7 @@ it "prints more of backtrace" do subject.process expect(subject.output.string).to eq( - "\e[1mException:\e[0m RuntimeError: oops\n" \ + "\001\e[1m\002Exception:\001\e[0m\002 RuntimeError: oops\n" \ "--\n" \ "0: /bin/pry:23:in `
'\n" \ "1: /bin/pry:23:in `
'\n" \ @@ -116,14 +116,14 @@ it "prints parts of both original and nested exception backtrace" do subject.process expect(subject.output.string).to eq( - "\e[1mException:\e[0m RuntimeError: outer\n" \ + "\001\e[1m\002Exception:\001\e[0m\002 RuntimeError: outer\n" \ "--\n" \ "0: /bin/pry:23:in `
'\n" \ "1: /bin/pry:23:in `
'\n" \ "2: /bin/pry:23:in `
'\n" \ "3: /bin/pry:23:in `
'\n" \ "4: /bin/pry:23:in `
'\n" \ - "\e[1mCaused by:\e[0m RuntimeError: inner\n" \ + "\001\e[1m\002Caused by:\001\e[0m\002 RuntimeError: inner\n" \ "--\n" \ "0: /bin/pry:23:in `
'\n" \ "1: /bin/pry:23:in `
'\n" \ @@ -140,7 +140,7 @@ it "prints both original and nested exception backtrace" do subject.process expect(subject.output.string).to eq( - "\e[1mException:\e[0m RuntimeError: outer\n" \ + "\001\e[1m\002Exception:\001\e[0m\002 RuntimeError: outer\n" \ "--\n" \ "0: /bin/pry:23:in `
'\n" \ "1: /bin/pry:23:in `
'\n" \ @@ -148,7 +148,7 @@ "3: /bin/pry:23:in `
'\n" \ "4: /bin/pry:23:in `
'\n" \ "5: /bin/pry:23:in `
'\n" \ - "\e[1mCaused by:\e[0m RuntimeError: inner\n" \ + "\001\e[1m\002Caused by:\001\e[0m\002 RuntimeError: inner\n" \ "--\n" \ "0: /bin/pry:23:in `
'\n" \ "1: /bin/pry:23:in `
'\n" \ @@ -177,17 +177,17 @@ it "prints lines of code that exception frame references" do subject.process expect(subject.output.string).to eq( - "\e[1mException:\e[0m RuntimeError: oops\n" \ + "\001\e[1m\002Exception:\001\e[0m\002 RuntimeError: oops\n" \ "--\n" \ - "0: \e[1m#{__FILE__}:168:in `
'\e[0m\n" \ + "0: \001\e[1m\002#{__FILE__}:168:in `
'\001\e[0m\002\n" \ " Array.new(6) { \"\#{__FILE__}:\#{__LINE__}:in `
'\" }\n" \ - "1: \e[1m#{__FILE__}:168:in `
'\e[0m\n" \ + "1: \001\e[1m\002#{__FILE__}:168:in `
'\001\e[0m\002\n" \ " Array.new(6) { \"\#{__FILE__}:\#{__LINE__}:in `
'\" }\n" \ - "2: \e[1m#{__FILE__}:168:in `
'\e[0m\n" \ + "2: \001\e[1m\002#{__FILE__}:168:in `
'\001\e[0m\002\n" \ " Array.new(6) { \"\#{__FILE__}:\#{__LINE__}:in `
'\" }\n" \ - "3: \e[1m#{__FILE__}:168:in `
'\e[0m\n" \ + "3: \001\e[1m\002#{__FILE__}:168:in `
'\001\e[0m\002\n" \ " Array.new(6) { \"\#{__FILE__}:\#{__LINE__}:in `
'\" }\n" \ - "4: \e[1m#{__FILE__}:168:in `
'\e[0m\n" \ + "4: \001\e[1m\002#{__FILE__}:168:in `
'\001\e[0m\002\n" \ " Array.new(6) { \"\#{__FILE__}:\#{__LINE__}:in `
'\" }\n" ) end @@ -200,13 +200,13 @@ it "skips code and prints only the backtrace frame" do subject.process expect(subject.output.string).to eq( - "\e[1mException:\e[0m RuntimeError: oops\n" \ + "\001\e[1m\002Exception:\001\e[0m\002 RuntimeError: oops\n" \ "--\n" \ - "0: \e[1m#{__FILE__}:168:in `
'\e[0m\n" \ - "1: \e[1m#{__FILE__}:168:in `
'\e[0m\n" \ - "2: \e[1m#{__FILE__}:168:in `
'\e[0m\n" \ - "3: \e[1m#{__FILE__}:168:in `
'\e[0m\n" \ - "4: \e[1m#{__FILE__}:168:in `
'\e[0m\n" + "0: \001\e[1m\002#{__FILE__}:168:in `
'\001\e[0m\002\n" \ + "1: \001\e[1m\002#{__FILE__}:168:in `
'\001\e[0m\002\n" \ + "2: \001\e[1m\002#{__FILE__}:168:in `
'\001\e[0m\002\n" \ + "3: \001\e[1m\002#{__FILE__}:168:in `
'\001\e[0m\002\n" \ + "4: \001\e[1m\002#{__FILE__}:168:in `
'\001\e[0m\002\n" ) end end