I have a couple same tests, the only different is the arguments, but I am having trouble of looping them one by one
Here is an example where the test is
subject.orange['orange tray'] do |tray|
expect(tray).not_to be_nil
subject.apple['apple tray'] do |tray|
expect(tray).not_to be_nil
here is what I am trying to do
fruits_list = ['orange', 'apple']
fruits_list.each do |fruit|
subject."#{fruit}[#{fruit} tray]" do |tray| <------- the error, I can't get this to work
expect(tray).not_to be_nil
end