Sha256: a951d7afca0ad178a2f889b80c5a14063d670ab77d8fcfe26c00743b4d660a52

Contents?: true

Size: 478 Bytes

Versions: 14

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

RSpec::Matchers.define :be_attached_to do |instance_id|
  match do |type|
    # NetworkInterface
    if type.instance_of?(Awspec::Type::NetworkInterface)
      return type.attached_to?(instance_id, @device_index)
    end

    type.attached_to?(instance_id)
  end

  chain :device_index do |device_index|
    @device_index = device_index
  end

  (0..10).each do |idx|
    chain "as_eth#{idx}".to_sym do
      @device_index = idx
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
awspec-1.32.0 lib/awspec/matcher/be_attached_to.rb
awspec-1.31.0 lib/awspec/matcher/be_attached_to.rb
awspec-1.30.0 lib/awspec/matcher/be_attached_to.rb
awspec-1.29.3 lib/awspec/matcher/be_attached_to.rb
awspec-1.29.2 lib/awspec/matcher/be_attached_to.rb
awspec-1.29.1 lib/awspec/matcher/be_attached_to.rb
awspec-1.29.0 lib/awspec/matcher/be_attached_to.rb
awspec-1.28.2 lib/awspec/matcher/be_attached_to.rb
awspec-1.28.1 lib/awspec/matcher/be_attached_to.rb
awspec-1.28.0 lib/awspec/matcher/be_attached_to.rb
awspec-1.27.1 lib/awspec/matcher/be_attached_to.rb
awspec-1.27.0 lib/awspec/matcher/be_attached_to.rb
awspec-1.26.0 lib/awspec/matcher/be_attached_to.rb
awspec-1.25.2 lib/awspec/matcher/be_attached_to.rb