From 45b9cefe7356818f441dd734ad87a16901883db4 Mon Sep 17 00:00:00 2001 From: Sijawusz Pur Rahnama Date: Fri, 1 Jan 2021 23:53:55 +0100 Subject: [PATCH] Remove unreliable specs --- spec/backtracer/backtrace/parser_spec.cr | 12 ------------ spec/backtracer/backtrace_spec.cr | 10 ++++++---- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/spec/backtracer/backtrace/parser_spec.cr b/spec/backtracer/backtrace/parser_spec.cr index 8ebbe75..7713983 100644 --- a/spec/backtracer/backtrace/parser_spec.cr +++ b/spec/backtracer/backtrace/parser_spec.cr @@ -5,12 +5,6 @@ describe Backtracer::Backtrace::Parser do it "handles `caller` as an input" do with_backtrace(caller) do |backtrace| backtrace.frames.should_not be_empty - - backtrace.frames.first - .tap(&.absolute_path.should eq(__FILE__)) - .tap(&.path.should eq("spec/backtracer/backtrace/parser_spec.cr")) - - backtrace.frames.last.method.should eq("main") end end @@ -20,12 +14,6 @@ describe Backtracer::Backtrace::Parser do rescue ex with_backtrace(ex.backtrace) do |backtrace| backtrace.frames.should_not be_empty - - backtrace.frames.first - .tap(&.absolute_path.should eq(__FILE__)) - .tap(&.path.should eq("spec/backtracer/backtrace/parser_spec.cr")) - - backtrace.frames.last.method.should eq("main") end end end diff --git a/spec/backtracer/backtrace_spec.cr b/spec/backtracer/backtrace_spec.cr index 3948c3e..c8d58f2 100644 --- a/spec/backtracer/backtrace_spec.cr +++ b/spec/backtracer/backtrace_spec.cr @@ -14,11 +14,13 @@ describe Backtracer::Backtrace do end end - it "#to_s" do - with_backtrace(caller) do |backtrace| - backtrace.to_s.should match(/backtrace_spec.cr/) + {% unless flag?(:release) || !flag?(:debug) %} + it "#to_s" do + with_backtrace(caller) do |backtrace| + backtrace.to_s.should match(/backtrace_spec.cr/) + end end - end + {% end %} it "#==" do with_backtrace(caller) do |backtrace|