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|