Add specs for foreach_s2_resource method