You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 24, 2025. It is now read-only.
Using rspec-any_of you can make flexible expectations on method call arguments.
it'sends greetings to chat'doexpect(Chat).toreceive(:message).with(all_of('Hello','My name is Phil')).twice# The only option normally is to be more verbose.# This is the most optimistic example, with more arguments it's getting noticeably worse.expect(Chat).toreceive(:message).with('Hello').andreceive(:message).with('My name is Phil')endit'greets'doexpect(Greeter).toreceive(:greet).with(any_of('hello','good bye'))# Or, normally:expect(Greeter).toreceive(:greet).with(eq('hello').or(eq('good bye')))end
Development
Check out the repo, run bundle to install dependencies.
Make your change, run rspec, rubocop to check the style, and yardoc to make sure documentation is correct.
Contributing
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Bug reports and pull requests are welcome on GitHub.