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.43.0 lib/awspec/matcher/have_record_set.rb
awspec-0.42.0 lib/awspec/matcher/have_record_set.rb
awspec-0.41.0 lib/awspec/matcher/have_record_set.rb
awspec-0.40.0 lib/awspec/matcher/have_record_set.rb
awspec-0.39.0 lib/awspec/matcher/have_record_set.rb
awspec-0.38.0 lib/awspec/matcher/have_record_set.rb
awspec-0.37.8 lib/awspec/matcher/have_record_set.rb
awspec-0.37.7 lib/awspec/matcher/have_record_set.rb
awspec-0.37.6 lib/awspec/matcher/have_record_set.rb
awspec-0.37.5 lib/awspec/matcher/have_record_set.rb
awspec-0.37.4 lib/awspec/matcher/have_record_set.rb
awspec-0.37.3 lib/awspec/matcher/have_record_set.rb
awspec-0.37.2 lib/awspec/matcher/have_record_set.rb
awspec-0.37.1 lib/awspec/matcher/have_record_set.rb
awspec-0.37.0 lib/awspec/matcher/have_record_set.rb
awspec-0.36.1 lib/awspec/matcher/have_record_set.rb
awspec-0.36.0 lib/awspec/matcher/have_record_set.rb
awspec-0.35.0 lib/awspec/matcher/have_record_set.rb
awspec-0.34.0 lib/awspec/matcher/have_record_set.rb
awspec-0.33.0 lib/awspec/matcher/have_record_set.rb