Skip to content

Commit

Permalink
Merge branch 'main' of github.com:marian13/convenient_service into main
Browse files Browse the repository at this point in the history
  • Loading branch information
marian13 committed Oct 29, 2022
2 parents 52f3acb + da38b47 commit 9531420
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/convenient_service/utils/proc/conjunct.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def initialize(procs)
# - https://en.wikipedia.org/wiki/Logical_conjunction
#
def call
return ->(item) { false } if procs.none?
return ->(item) { true } if procs.none?

return procs.first if procs.one?

Expand Down
4 changes: 2 additions & 2 deletions spec/lib/convenient_service/utils/proc/conjunct_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
context "when procs array is empty" do
let(:procs) { [] }

it "returns proc that always evaluates to false" do
expect(conjuction[item]).to eq(false)
it "returns proc that always evaluates to true" do
expect(conjuction[item]).to eq(true)
end
end

Expand Down

0 comments on commit 9531420

Please sign in to comment.