Just use the splat (*) operator, which expands an array of elements into a list of arguments which can be passed to a method:
test_arr = [1, 3]
describe [1, 3, 7] do
it { should include(*test_arr) }
end
Just use the splat (*) operator, which expands an array of elements into a list of arguments which can be passed to a method:
test_arr = [1, 3]
describe [1, 3, 7] do
it { should include(*test_arr) }
end