Sha256: 2021d26d377f8754a34a6d866d13d5913f52f5ee8e9837f0abeb43c2befd91ef

Contents?: true

Size: 946 Bytes

Versions: 36

Compression:

Stored size: 946 Bytes

Contents

RSpec::Matchers.define :have_rule do |rule_id|
  match do |type|
    return type.has_rule?(rule_id, @priority, @action) if type.instance_of?(Awspec::Type::WafWebAcl)
    return type.has_rule?(rule_id, @priority, @action) if type.instance_of?(Awspec::Type::WafregionalWebAcl)
    return type.has_rule?(rule_id, @priority, @conditions, @actions) if type.instance_of?(Awspec::Type::AlbListener)
    type.has_rule?(rule_id, @priority, @conditions, @actions) if type.instance_of?(Awspec::Type::NlbListener)
  end

  chain :priority do |priority|
    @priority = priority
  end

  chain :order do |priority|
    @priority = priority
  end

  chain :action do |action|
    @action = action
  end

  chain :conditions do |conditions|
    @conditions = conditions
  end

  chain :actions do |actions|
    @actions = actions
  end

  chain :if do |conditions|
    @conditions = conditions
  end

  chain :then do |actions|
    @actions = actions
  end
end

Version data entries

36 entries across 36 versions & 3 rubygems

Version Path
awspec-1.25.1 lib/awspec/matcher/have_rule.rb
awspec-1.25.0 lib/awspec/matcher/have_rule.rb
awspec-1.24.4 lib/awspec/matcher/have_rule.rb
awspec-1.24.3 lib/awspec/matcher/have_rule.rb
awspec-1.24.2 lib/awspec/matcher/have_rule.rb
awspec-1.24.1 lib/awspec/matcher/have_rule.rb
awspec-1.24.0 lib/awspec/matcher/have_rule.rb
awspec-1.23.0 lib/awspec/matcher/have_rule.rb
awspec-1.22.1 lib/awspec/matcher/have_rule.rb
awspec-1.22.0 lib/awspec/matcher/have_rule.rb
awspec-1.21.1 lib/awspec/matcher/have_rule.rb
awspec-1.21.0 lib/awspec/matcher/have_rule.rb
awspec-1.20.0 lib/awspec/matcher/have_rule.rb
awspec-1.19.2 lib/awspec/matcher/have_rule.rb
awspec-1.19.1 lib/awspec/matcher/have_rule.rb
awspec-1.19.0 lib/awspec/matcher/have_rule.rb
cthiesfork-awspec-1.2.4 lib/awspec/matcher/have_rule.rb
awspec-api_gateway_extended-1.2.4 lib/awspec/matcher/have_rule.rb
awspec-api_gateway_extended-1.2.3 lib/awspec/matcher/have_rule.rb
awspec-1.18.6 lib/awspec/matcher/have_rule.rb