blob: 790bea1077f988c739d815de4915a52692dbecce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
require 'mspec/guards/platform'
class SupportedGuard < SpecGuard
def match?
if @parameters.include? :ruby
raise Exception, "improper use of not_supported_on guard"
end
!PlatformGuard.standard? and PlatformGuard.implementation?(*@parameters)
end
end
def not_supported_on(*args, &block)
SupportedGuard.new(*args).run_unless(:not_supported_on, &block)
end
|