Skip to content

Instantly share code, notes, and snippets.

@labocho
Last active March 7, 2023 08:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save labocho/0c1f9eaff0c8e65e5e402682dc3cd7bc to your computer and use it in GitHub Desktop.
Save labocho/0c1f9eaff0c8e65e5e402682dc3cd7bc to your computer and use it in GitHub Desktop.
RSpec matcher for validating argument by block
RSpec::Matchers.define :a_valid_argument do
match {|actual| block_arg.call(actual) }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment