Last active
March 7, 2023 08:26
-
-
Save labocho/0c1f9eaff0c8e65e5e402682dc3cd7bc to your computer and use it in GitHub Desktop.
RSpec matcher for validating argument by block
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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