From 158ff426e80df6140078c8c15e08b8e562b3e62e Mon Sep 17 00:00:00 2001 From: Phil Pirozhkov Date: Sun, 4 Aug 2024 20:15:01 +0300 Subject: [PATCH] fix features --- features/built_in_matchers/satisfy.feature | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/features/built_in_matchers/satisfy.feature b/features/built_in_matchers/satisfy.feature index b2f6a35de..e810d3547 100644 --- a/features/built_in_matchers/satisfy.feature +++ b/features/built_in_matchers/satisfy.feature @@ -59,16 +59,11 @@ Feature: `satisfy` matcher Given a file named "satisfy_matcher_returned_value_spec.rb" with: """ruby RSpec.describe "double-purpose" do - def action!(ary, entry) - ary.push(entry) - ary.sum - end - it "adds an entry and returns the sum" do - ary = [1] - expect { action!(ary, 3) } - .to change { ary }.to([1, 3]) - .and satisfy { |returned_value| returned_value == 4 } + ary = [1, 2, 3] + expect { ary.shift } + .to change { ary }.to([2, 3]) + .and satisfy { |returned_value| returned_value == 1 } end end """