From a36d1cf8cc33c8527551d3afe61efcae6a56c060 Mon Sep 17 00:00:00 2001 From: danascheider Date: Tue, 17 May 2016 11:53:30 -0700 Subject: [PATCH] Add with_filtered_backtrace method to unknown result --- lib/cucumber/core/test/result.rb | 4 ++++ spec/cucumber/core/test/result_spec.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/cucumber/core/test/result.rb b/lib/cucumber/core/test/result.rb index d6f8b7bb..2ed0f5fa 100644 --- a/lib/cucumber/core/test/result.rb +++ b/lib/cucumber/core/test/result.rb @@ -30,6 +30,10 @@ class Unknown def describe_to(visitor, *args) self end + + def with_filtered_backtrace(filter) + self + end end class Passed diff --git a/spec/cucumber/core/test/result_spec.rb b/spec/cucumber/core/test/result_spec.rb index 02493ec6..1ee04f2a 100644 --- a/spec/cucumber/core/test/result_spec.rb +++ b/spec/cucumber/core/test/result_spec.rb @@ -118,6 +118,10 @@ module Cucumber::Core::Test result.describe_to(visitor, args) end + it "defines a with_filtered_backtrace method" do + expect(result.with_filtered_backtrace(double("filter"))).to eql result + end + specify { expect( result.to_sym ).to eq :unknown } specify { expect( result ).not_to be_passed }