Rspec :“array.should == another_array”이지만 순서는 신경 쓰지 않습니다 배열을 비교하고 순서에 관계없이 동일한 요소를 포함하고 있는지 확인하고 싶습니다. RSpec에서이를 수행하는 간결한 방법이 있습니까? 허용되지 않는 방법은 다음과 같습니다. #to_set 예를 들면 다음과 같습니다. expect(array.to_set).to eq another_array.to_set 또는 array.to_set.should == another_array.to_set 배열에 중복 된 항목이 있으면 실패합니다. #sort 예를 들면 다음과 같습니다. expect(array.sort).to eq another_array.sort 또는 array.sort.should == another_arr..