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.0.0.rc lib/awspec/matcher/have_record_set.rb
awspec-0.88.2 lib/awspec/matcher/have_record_set.rb
awspec-0.88.1 lib/awspec/matcher/have_record_set.rb
awspec-0.88.0 lib/awspec/matcher/have_record_set.rb