Check that an enumerable satisfies matchers with args in RSpec
Note: I discovered this API based on a suggestion from an AI editor assistant, just to disclaim that. When creating an RSpec test against an enumerable, rubocop-rspec will enforce that the all matcher be used instead: it "only returns odd numbers" do odd = [1 3 5] expect(odd).all(be_odd) end This is fine for a matcher that doesn’t require any args...