Sha256: ceb7d648c5ef8a5a5e280c05cc0115d7fad0ffb6b2fe4d280c5bece37d879775

Contents?: true

Size: 817 Bytes

Versions: 168

Compression:

Stored size: 817 Bytes

Contents

RSpec::Matchers.define :have_record_set do |name|
  match do |hosted_zone|
    hosted_zone.has_record_set?(name, @type, @value, @options)
  end

  %w(soa a txt ns cname mx ptr srv spf aaaa).each do |type|
    chain type do |value|
      @type = type
      @value = value
      @options = {} if @options.nil?
    end
  end

  chain :alias do |dns_name, hosted_zone_id|
    @type = 'a'
    @options = {} if @options.nil?
    @options[:alias_dns_name] = dns_name
    @options[:alias_hosted_zone_id] = hosted_zone_id
  end

  chain :aaaa_alias do |dns_name, hosted_zone_id|
    @type = 'aaaa'
    @options = {} if @options.nil?
    @options[:alias_dns_name] = dns_name
    @options[:alias_hosted_zone_id] = hosted_zone_id
  end

  chain :ttl do |ttl|
    @options = {} if @options.nil?
    @options[:ttl] = ttl
  end
end

Version data entries

168 entries across 168 versions & 2 rubygems

Version Path
awspec-0.32.0 lib/awspec/matcher/have_record_set.rb
awspec-0.31.0 lib/awspec/matcher/have_record_set.rb
awspec-0.30.0 lib/awspec/matcher/have_record_set.rb
awspec-0.29.0 lib/awspec/matcher/have_record_set.rb
awspec-0.28.1 lib/awspec/matcher/have_record_set.rb
awspec-0.28.0 lib/awspec/matcher/have_record_set.rb
awspec-0.27.2 lib/awspec/matcher/have_record_set.rb
awspec-0.27.1 lib/awspec/matcher/have_record_set.rb
awspec-0.27.0 lib/awspec/matcher/have_record_set.rb
awspec-0.26.2 lib/awspec/matcher/have_record_set.rb
awspec-0.26.1 lib/awspec/matcher/have_record_set.rb
awspec-0.26.0 lib/awspec/matcher/have_record_set.rb
awspec-0.25.3 lib/awspec/matcher/have_record_set.rb
awspec-0.25.2 lib/awspec/matcher/have_record_set.rb
awspec-0.25.1 lib/awspec/matcher/have_record_set.rb
awspec-0.25.0 lib/awspec/matcher/have_record_set.rb
awspec-0.24.2 lib/awspec/matcher/have_record_set.rb
awspec-0.24.1 lib/awspec/matcher/have_record_set.rb
awspec-0.24.0 lib/awspec/matcher/have_record_set.rb
awspec-0.23.0 lib/awspec/matcher/have_record_set.rb