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
awspec-1.25.1 lib/awspec/matcher/have_record_set.rb
awspec-1.25.0 lib/awspec/matcher/have_record_set.rb
awspec-1.24.4 lib/awspec/matcher/have_record_set.rb
awspec-1.24.3 lib/awspec/matcher/have_record_set.rb
awspec-1.24.2 lib/awspec/matcher/have_record_set.rb
awspec-1.24.1 lib/awspec/matcher/have_record_set.rb
awspec-1.24.0 lib/awspec/matcher/have_record_set.rb
awspec-1.23.0 lib/awspec/matcher/have_record_set.rb
awspec-1.22.1 lib/awspec/matcher/have_record_set.rb
awspec-1.22.0 lib/awspec/matcher/have_record_set.rb
awspec-1.21.1 lib/awspec/matcher/have_record_set.rb
awspec-1.21.0 lib/awspec/matcher/have_record_set.rb
awspec-1.20.0 lib/awspec/matcher/have_record_set.rb
awspec-1.19.2 lib/awspec/matcher/have_record_set.rb
awspec-1.19.1 lib/awspec/matcher/have_record_set.rb
awspec-1.19.0 lib/awspec/matcher/have_record_set.rb
cthiesfork-awspec-1.2.4 lib/awspec/matcher/have_record_set.rb
awspec-api_gateway_extended-1.2.4 lib/awspec/matcher/have_record_set.rb
awspec-api_gateway_extended-1.2.3 lib/awspec/matcher/have_record_set.rb
awspec-1.18.6 lib/awspec/matcher/have_record_set.rb