Pass Array value in cucumber .feature file
I don't think you need the square brackets.
When I pass this array "aa,bb,cc"
You have to split your string up.
When(/I pass this array "([^"]*)"$/) do |array|
array.split(',').each{|entry| do something }
end
Note: you may want to strip the entries in case there is whitespace around them {|entry| puts entry.strip }