Sha256: 91301b130ac6298f70447ea8ddee3d877cc637942cc92806e3929f182918d746

Contents?: true

Size: 395 Bytes

Versions: 53

Compression:

Stored size: 395 Bytes

Contents

RSpec::Matchers.define :have_rule do |rule|
  match do |subject|
    if subject.class.name == 'Serverspec::Type::Iptables' || subject.class.name == 'Serverspec::Type::Ip6tables'
      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

53 entries across 53 versions & 3 rubygems

Version Path
serverspec-ruby19-2.24.3 lib/serverspec/matcher/have_rule.rb
serverspec-2.29.2 lib/serverspec/matcher/have_rule.rb
serverspec-2.29.1 lib/serverspec/matcher/have_rule.rb
serverspec-2.29.0 lib/serverspec/matcher/have_rule.rb
serverspec-2.28.0 lib/serverspec/matcher/have_rule.rb
serverspec-2.27.0 lib/serverspec/matcher/have_rule.rb
serverspec-2.26.0 lib/serverspec/matcher/have_rule.rb
serverspec-2.25.0 lib/serverspec/matcher/have_rule.rb
serverspec-2.24.3 lib/serverspec/matcher/have_rule.rb
serverspec-2.24.2 lib/serverspec/matcher/have_rule.rb
serverspec-2.24.1 lib/serverspec/matcher/have_rule.rb
serverspec-2.24.0 lib/serverspec/matcher/have_rule.rb
serverspec-2.23.1 lib/serverspec/matcher/have_rule.rb
serverspec-2.23.0 lib/serverspec/matcher/have_rule.rb
serverspec-2.22.0 lib/serverspec/matcher/have_rule.rb
serverspec-2.21.1 lib/serverspec/matcher/have_rule.rb
serverspec-2.21.0 lib/serverspec/matcher/have_rule.rb
serverspec-2.20.0 lib/serverspec/matcher/have_rule.rb
serverspec-2.19.0 lib/serverspec/matcher/have_rule.rb
serverspec-2.18.0 lib/serverspec/matcher/have_rule.rb