Sha256: 7359f9764300de86557bc881ea97575aa1b9c9b3e1275e468ca62b569ca2ade2

Contents?: true

Size: 674 Bytes

Versions: 73

Compression:

Stored size: 674 Bytes

Contents

shared_context 'region', :region do
  before do |example|
    region = example.metadata[:region]
    @_region = Aws.config[:region]
    Aws.config[:region] = region
  end

  after do
    Aws.config[:region] = @_region
  end
end

shared_context 'account', :account do
  before do |example|
    sts_client = Aws::STS::Client.new
    raise Awspec::InvalidAccountError unless sts_client.get_caller_identity.account == example.metadata[:account]
    example.metadata[:described_class].account = example.metadata[:account]
  end
end

shared_context 'cluster', :cluster do
  before do |example|
    example.metadata[:described_class].cluster = example.metadata[:cluster]
  end
end

Version data entries

73 entries across 73 versions & 2 rubygems

Version Path
awspec-1.12.7 lib/awspec/shared_context.rb
awspec-1.12.6 lib/awspec/shared_context.rb
awspec-1.12.5 lib/awspec/shared_context.rb
awspec-1.12.4 lib/awspec/shared_context.rb
awspec-1.12.3 lib/awspec/shared_context.rb
awspec-1.12.2 lib/awspec/shared_context.rb
awspec-1.12.1 lib/awspec/shared_context.rb
awspec-1.12.0 lib/awspec/shared_context.rb
awspec-1.11.1 lib/awspec/shared_context.rb
awspec-1.11.0 lib/awspec/shared_context.rb
awspec-1.10.0 lib/awspec/shared_context.rb
awspec-1.9.0 lib/awspec/shared_context.rb
awspec-1.8.0 lib/awspec/shared_context.rb
awspec-1.7.0 lib/awspec/shared_context.rb
awspec-1.6.1 lib/awspec/shared_context.rb
awspec-1.6.0 lib/awspec/shared_context.rb
awspec-1.5.4 lib/awspec/shared_context.rb
awspec-1.5.3 lib/awspec/shared_context.rb
awspec-1.5.2 lib/awspec/shared_context.rb
awspec-1.5.1 lib/awspec/shared_context.rb