Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to check for array elements except the first one with 'its' #459

Open
i-n00b opened this issue Mar 13, 2019 · 0 comments
Open

How to check for array elements except the first one with 'its' #459

i-n00b opened this issue Mar 13, 2019 · 0 comments

Comments

@i-n00b
Copy link

i-n00b commented Mar 13, 2019

I am trying to write a spec for DynamoDB table with multiple global secondary indexes. I'm unable to get the value of any index except the first and last one using the 'first' and 'last' methods.

describe dynamodb_table('Group_Resource') do
it { should exist }
its ('global_secondary_indexes.first.index_name') { should eq 'Resource_ID-index' }
end

How can I fetch the second and third values of the array global_secondary_indexes? I've tried using global_secondary_indexes.fetch(2), global_secondary_indexes[2] but both give errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants