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

Version Path
rhodes-5.5.18 lib/extensions/mspec/mspec/guards/support.rb
rhodes-5.5.17 lib/extensions/mspec/mspec/guards/support.rb
rhodes-5.5.15 lib/extensions/mspec/mspec/guards/support.rb
rhodes-5.5.0.22 lib/extensions/mspec/mspec/guards/support.rb
rhodes-5.5.2 lib/extensions/mspec/mspec/guards/support.rb
rhodes-5.5.0.7 lib/extensions/mspec/mspec/guards/support.rb
rhodes-5.5.0.3 lib/extensions/mspec/mspec/guards/support.rb
rhodes-5.5.0 lib/extensions/mspec/mspec/guards/support.rb
tauplatform-1.0.3 lib/extensions/mspec/mspec/guards/support.rb
mspec-1.9.1 lib/mspec/guards/support.rb
mspec-1.9.0 lib/mspec/guards/support.rb
tauplatform-1.0.2 lib/extensions/mspec/mspec/guards/support.rb
tauplatform-1.0.1 lib/extensions/mspec/mspec/guards/support.rb
mspec-1.8.0 lib/mspec/guards/support.rb
mspec-1.7.0 lib/mspec/guards/support.rb
mspec-1.6.0 lib/mspec/guards/support.rb
mspec-1.5.21 lib/mspec/guards/support.rb
mspec-1.5.20 lib/mspec/guards/support.rb
mspec-1.5.19 lib/mspec/guards/support.rb
mspec-1.5.18 lib/mspec/guards/support.rb