Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
fix features
Browse files Browse the repository at this point in the history
  • Loading branch information
pirj committed Aug 4, 2024
1 parent aa5a7cc commit 158ff42
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions features/built_in_matchers/satisfy.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down

0 comments on commit 158ff42

Please sign in to comment.