Skip to content

Commit

Permalink
Fix include matcher behavior
Browse files Browse the repository at this point in the history
rspec-expectations recently released v3.13.2, which includes a change to
the include matcher (see rspec/rspec-expectations@bd5d306).

This change breaks using the splat operator on an array into the include
matcher.

This commit updates the matcher to iterate over the array instead of
using the splat operator.

(cherry picked from commit 8e49889)
  • Loading branch information
mhashizume authored and github-actions[bot] committed Aug 27, 2024
1 parent 56d3799 commit 9a122f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/integration/parser/collection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def expect_the_message_to_be(expected_messages, code, node = Puppet::Node.new('t
catalog = compile_to_catalog(code, node)
messages = catalog.resources.find_all { |resource| resource.type == 'Notify' }.
collect { |notify| notify[:message] }
expect(messages).to include(*expected_messages)
expected_messages.each { |message| expect(messages).to include(message) }
end

def warnings
Expand Down

0 comments on commit 9a122f8

Please sign in to comment.