How to check for array elements except the first one with 'its'
i-n00b opened this issue · 0 comments
i-n00b commented
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.