Skip to content

Instantly share code, notes, and snippets.

@YumaInaura
Created September 24, 2015 07:19
Show Gist options
  • Save YumaInaura/ac7a4f9ae11bf0f839bf to your computer and use it in GitHub Desktop.
Save YumaInaura/ac7a4f9ae11bf0f839bf to your computer and use it in GitHub Desktop.
rspec: match_array は 多次元配列の順番を検証してしまう ref: http://qiita.com/Yinaura/items/e20fbfee18e34c195f85
expect([1,2]).to match_array [2,1] # => true
expect([[1,2],[3,4]]).to match_array [[2,1],[4,3]] # => false
expect([[1,2],[3,4]]).to match_array [[3,4],[1,2]] # => true
expect([1,2]).to match_array [2,1] # => true
expect([3,4]).to match_array [4,3] # => true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment