Sha256: bc47c24ac4067f6e364d20f9e800484a2a708e10556c4a1f1d71ee568d0d8f23

Contents?: true

Size: 308 Bytes

Versions: 15

Compression:

Stored size: 308 Bytes

Contents

require 'mspec/guards/guard'

class ComplianceGuard < SpecGuard
end

class Object
  def compliant_on(*args)
    g = ComplianceGuard.new(*args)
    yield if g.yield?
    g.unregister
  end

  def not_compliant_on(*args)
    g = ComplianceGuard.new(*args)
    yield if g.yield? true
    g.unregister
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
mspec-1.0.0 lib/mspec/guards/compliance.rb
mspec-1.5.2 lib/mspec/guards/compliance.rb
mspec-1.5.4 lib/mspec/guards/compliance.rb
mspec-1.2.0 lib/mspec/guards/compliance.rb
mspec-1.5.1 lib/mspec/guards/compliance.rb
mspec-1.4.0 lib/mspec/guards/compliance.rb
mspec-1.5.0 lib/mspec/guards/compliance.rb
mspec-1.5.3 lib/mspec/guards/compliance.rb
mspec-1.1.0 lib/mspec/guards/compliance.rb
mspec-1.1.1 lib/mspec/guards/compliance.rb
mspec-1.3.0 lib/mspec/guards/compliance.rb
mspec-1.3.1 lib/mspec/guards/compliance.rb
mspec-1.5.7 lib/mspec/guards/compliance.rb
mspec-1.5.5 lib/mspec/guards/compliance.rb
mspec-1.5.6 lib/mspec/guards/compliance.rb