Sha256: 68c5a337663c924e1ab87b1dbd3eed8e086241817b93c38d6c155ee466078c4b

Contents?: true

Size: 821 Bytes

Versions: 44

Compression:

Stored size: 821 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 caa).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

44 entries across 44 versions & 1 rubygems

Version Path
awspec-1.17.0 lib/awspec/matcher/have_record_set.rb
awspec-1.16.1 lib/awspec/matcher/have_record_set.rb
awspec-1.16.0 lib/awspec/matcher/have_record_set.rb
awspec-1.15.3 lib/awspec/matcher/have_record_set.rb
awspec-1.15.2 lib/awspec/matcher/have_record_set.rb
awspec-1.15.1 lib/awspec/matcher/have_record_set.rb
awspec-1.15.0 lib/awspec/matcher/have_record_set.rb
awspec-1.14.1 lib/awspec/matcher/have_record_set.rb
awspec-1.14.0 lib/awspec/matcher/have_record_set.rb
awspec-1.13.0 lib/awspec/matcher/have_record_set.rb
awspec-1.12.7 lib/awspec/matcher/have_record_set.rb
awspec-1.12.6 lib/awspec/matcher/have_record_set.rb
awspec-1.12.5 lib/awspec/matcher/have_record_set.rb
awspec-1.12.4 lib/awspec/matcher/have_record_set.rb
awspec-1.12.3 lib/awspec/matcher/have_record_set.rb
awspec-1.12.2 lib/awspec/matcher/have_record_set.rb
awspec-1.12.1 lib/awspec/matcher/have_record_set.rb
awspec-1.12.0 lib/awspec/matcher/have_record_set.rb
awspec-1.11.1 lib/awspec/matcher/have_record_set.rb
awspec-1.11.0 lib/awspec/matcher/have_record_set.rb