Sha256: a7cf94ca7b42c38b637d73c23793972b015c230aa6192ae41fdf5e488d437a90

Contents?: true

Size: 340 Bytes

Versions: 38

Compression:

Stored size: 340 Bytes

Contents

RSpec::Matchers.define :have_rule do |rule|
  match do |subject|
    if subject.class.name == 'Serverspec::Type::Iptables'
      subject.has_rule?(rule, @table, @chain)
    else
      subject.has_rule?(rule)
    end
  end

  chain :with_table do |table|
    @table = table
  end

  chain :with_chain do |chain|
    @chain = chain
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
serverspec-2.0.0.beta20 lib/serverspec/matcher/have_rule.rb
serverspec-2.0.0.beta19 lib/serverspec/matcher/have_rule.rb
serverspec-2.0.0.beta18 lib/serverspec/matcher/have_rule.rb
serverspec-2.0.0.beta17 lib/serverspec/matcher/have_rule.rb
serverspec-1.14.0 lib/serverspec/matchers/have_rule.rb
serverspec-1.13.0 lib/serverspec/matchers/have_rule.rb
serverspec-1.12.0 lib/serverspec/matchers/have_rule.rb
serverspec-2.0.0.beta16 lib/serverspec/matchers/have_rule.rb
serverspec-2.0.0.beta15 lib/serverspec/matchers/have_rule.rb
serverspec-2.0.0.beta14 lib/serverspec/matchers/have_rule.rb
serverspec-2.0.0.beta13 lib/serverspec/matchers/have_rule.rb
serverspec-2.0.0.beta12 lib/serverspec/matchers/have_rule.rb
serverspec-2.0.0.beta11 lib/serverspec/matchers/have_rule.rb
serverspec-1.11.0 lib/serverspec/matchers/have_rule.rb
serverspec-2.0.0.beta10 lib/serverspec/matchers/have_rule.rb
serverspec-2.0.0.beta9 lib/serverspec/matchers/have_rule.rb
serverspec-1.10.0 lib/serverspec/matchers/have_rule.rb
serverspec-2.0.0.beta8 lib/serverspec/matchers/have_rule.rb
serverspec-2.0.0.beta7 lib/serverspec/matchers/have_rule.rb
serverspec-1.9.1 lib/serverspec/matchers/have_rule.rb