Skip to content

Commit

Permalink
Add documentation for cspecify
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyevans committed Jul 23, 2024
1 parent 573a6f4 commit d850b43
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/guards_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d850b43

Please sign in to comment.