Sha256: f96378e34931a0e619ae8e1bfee4cfed9c3bd75e59e8c0a982a90898e235e698

Contents?: true

Size: 338 Bytes

Versions: 116

Compression:

Stored size: 338 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

116 entries across 116 versions & 1 rubygems

Version Path
serverspec-1.0.0 lib/serverspec/matchers/have_rule.rb
serverspec-0.16.0 lib/serverspec/matchers/have_rule.rb
serverspec-0.15.5 lib/serverspec/matchers/have_rule.rb
serverspec-0.15.4 lib/serverspec/matchers/have_rule.rb
serverspec-0.15.3 lib/serverspec/matchers/have_rule.rb
serverspec-0.15.2 lib/serverspec/matchers/have_rule.rb
serverspec-0.15.1 lib/serverspec/matchers/have_rule.rb
serverspec-0.15.0 lib/serverspec/matchers/have_rule.rb
serverspec-0.14.4 lib/serverspec/matchers/have_rule.rb
serverspec-0.14.3 lib/serverspec/matchers/have_rule.rb
serverspec-0.14.2 lib/serverspec/matchers/have_rule.rb
serverspec-0.14.1 lib/serverspec/matchers/have_rule.rb
serverspec-0.14.0 lib/serverspec/matchers/have_rule.rb
serverspec-0.13.7 lib/serverspec/matchers/have_rule.rb
serverspec-0.13.6 lib/serverspec/matchers/have_rule.rb
serverspec-0.13.5 lib/serverspec/matchers/have_rule.rb
serverspec-0.13.4 lib/serverspec/matchers/have_rule.rb
serverspec-0.13.3 lib/serverspec/matchers/have_rule.rb
serverspec-0.13.2 lib/serverspec/matchers/have_rule.rb
serverspec-0.13.1 lib/serverspec/matchers/have_rule.rb