Created
September 24, 2015 07:19
-
-
Save YumaInaura/ac7a4f9ae11bf0f839bf to your computer and use it in GitHub Desktop.
rspec: match_array は 多次元配列の順番を検証してしまう ref: http://qiita.com/Yinaura/items/e20fbfee18e34c195f85
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expect([1,2]).to match_array [2,1] # => true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expect([[1,2],[3,4]]).to match_array [[2,1],[4,3]] # => false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
expect([[1,2],[3,4]]).to match_array [[3,4],[1,2]] # => true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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