how can i make array value in rspec test?
If I make array like this (in SAMPLE_spec.rb file), ->>
let(:fruit) { [name: ‘apple’, color: ‘red’] }
fruit.length
--->> this becomes error
fruit[0].length
--->>this works well
i want to make array and use like fruit.length
. how can i change my code?
Aucun commentaire:
Enregistrer un commentaire