Sha256: c45aa430c860fa412412431084e063e15c52b0e3b62ed786156524a58ca80eda
Contents?: true
Size: 395 Bytes
Versions: 175
Compression:
Stored size: 395 Bytes
Contents
require 'mspec/guards/guard' class SupportedGuard < SpecGuard def match? if @args.include? :ruby raise Exception, "improper use of not_supported_on guard" end standard? or !implementation?(*@args) end end class Object def not_supported_on(*args) g = SupportedGuard.new(*args) g.name = :not_supported_on yield if g.yield? ensure g.unregister end end
Version data entries
175 entries across 151 versions & 4 rubygems