Sha256: da0d0bc1511f117640c5e6231aeefbe0bfe07eb0cad8f6e541b1111dc434a2b8

Contents?: true

Size: 987 Bytes

Versions: 30

Compression:

Stored size: 987 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

  chain :type do |type|
    @type = type
  end

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

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
cthiesfork-awspec-1.2.2 lib/awspec/matcher/have_record_set.rb
cthiesfork-awspec-1.2.1 lib/awspec/matcher/have_record_set.rb
awspec-1.18.5 lib/awspec/matcher/have_record_set.rb
cthiesfork-awspec-1.2.0 lib/awspec/matcher/have_record_set.rb
cthiesfork-awspec-1.1.0 lib/awspec/matcher/have_record_set.rb
cthiesfork-awspec-1.0.0 lib/awspec/matcher/have_record_set.rb
awspec-1.18.4 lib/awspec/matcher/have_record_set.rb
awspec-1.18.3 lib/awspec/matcher/have_record_set.rb
awspec-1.18.2 lib/awspec/matcher/have_record_set.rb
awspec-1.18.1 lib/awspec/matcher/have_record_set.rb