From d850b4351fd8ef8105f43b5a04526b5b8066292c Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Tue, 23 Jul 2024 12:19:32 -0700 Subject: [PATCH] Add documentation for cspecify --- spec/guards_helper.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/guards_helper.rb b/spec/guards_helper.rb index 25bd9f640..f12c8abc5 100644 --- a/spec/guards_helper.rb +++ b/spec/guards_helper.rb @@ -33,6 +33,17 @@ def Sequel.guarded?(*checked) end module Minitest::Spec::DSL + # Check all entries in +checked+, and mark them pending if they match. +checked+ entries + # support the following types of matching: + # + # Symbol: checks database type + # [Symbol] : checks adapter scheme + # [Symbol, Symbol] : checks adapter scheme and database type + # [Proc, Symbol] : Checks proc and database type + # [Symbol, Proc] : Checks adapter scheme and proc + # [Symbol, Symbol, Proc]: Checks adapter scheme, database type, and proc + # + # If any +checked+ matching returns true, then the spec is marked as pending. def cspecify(message, *checked, &block) if pending = Sequel.guarded?(*checked) it(message) do