Skip to content

Commit

Permalink
Fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
flash-gordon committed Dec 24, 2021
1 parent 0d363fa commit 65889c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/integration/rule_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@
end

specify "defining a rule with options" do
rule = Dry::Logic::Rule(id: :empty?, &:empty?)
# rubocop:disable Style/SymbolProc
# using &:empty? breaks the spec
rule = Dry::Logic::Rule(id: :empty?) { |value| value.empty? }
# rubocop:enable Style/SymbolProc

expect(rule.("foo")).to be_failure
expect(rule.("")).to be_success
Expand Down

0 comments on commit 65889c1

Please sign in to comment.