Sha256: 4f15a1196f0e597f1da78fff12a2d22d1c5466e48f19ed02d5c0eec3e671bedc

Contents?: true

Size: 1.13 KB

Versions: 56

Compression:

Stored size: 1.13 KB

Contents

### exist

```ruby
describe lambda('my-lambda-function-name') do
  it { should exist }
end
```

### have_env_vars

Useful to validate if there are environment variables configured in the Lambda:

```ruby
describe lambda('my-lambda-function-name') do
  it { should have_env_vars() }
end
```

### have_env_var

Useful to validate if there is a specific environment variable declared in the Lambda. You probably will want to use it with `have_env_var_value`.

## have_env_var_value

Validates if a specific environment variable has the expected value. More useful to use with `have_env_var` because if the variable isn't available, it will fail without notifying that the variable is missing.

```ruby
expected.each_pair do |key, value|
  context "environment variable #{key}" do
    it { should have_env_var(key) }
    it { should have_env_var_value(key, value) }
  end
end
```

`expected` would be a hash that has the environment variables names as keys.

### have_event_source

This matcher does not support Amazon S3 event sources ([see SDK doc](http://docs.aws.amazon.com/sdkforruby/api/Aws/Lambda/Client.html#list_event_source_mappings-instance_method)).

Version data entries

56 entries across 56 versions & 3 rubygems

Version Path
awspec-1.31.0 doc/_resource_types/lambda.md
awspec-1.30.0 doc/_resource_types/lambda.md
awspec-1.29.3 doc/_resource_types/lambda.md
awspec-1.29.2 doc/_resource_types/lambda.md
awspec-1.29.1 doc/_resource_types/lambda.md
awspec-1.29.0 doc/_resource_types/lambda.md
awspec-1.28.2 doc/_resource_types/lambda.md
awspec-1.28.1 doc/_resource_types/lambda.md
awspec-1.28.0 doc/_resource_types/lambda.md
awspec-1.27.1 doc/_resource_types/lambda.md
awspec-1.27.0 doc/_resource_types/lambda.md
awspec-1.26.0 doc/_resource_types/lambda.md
awspec-1.25.2 doc/_resource_types/lambda.md
awspec-1.25.1 doc/_resource_types/lambda.md
awspec-1.25.0 doc/_resource_types/lambda.md
awspec-1.24.4 doc/_resource_types/lambda.md
awspec-1.24.3 doc/_resource_types/lambda.md
awspec-1.24.2 doc/_resource_types/lambda.md
awspec-1.24.1 doc/_resource_types/lambda.md
awspec-1.24.0 doc/_resource_types/lambda.md