Skip to content

Commit

Permalink
Use Hash#==, #eql? specs from rubyspec
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Oct 29, 2013
1 parent 359acdc commit 5dddee5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
20 changes: 20 additions & 0 deletions spec/filters/bugs/hash.rb
Expand Up @@ -36,6 +36,26 @@
fails "Hash#each_pair properly expands (or not) child class's 'each'-yielded args"
fails "Hash#each_pair yields the key only to a block expecting |key,|"

fails "Hash#== compares the values in self to values in other hash"
fails "Hash#== returns true iff other Hash has the same number of keys and each key-value pair matches"
fails "Hash#== compares keys with matching hash codes via eql?"
fails "Hash#== compares keys with eql? semantics"
fails "Hash#== computes equality for recursive hashes & arrays"
fails "Hash#== computes equality for complex recursive hashes"
fails "Hash#== does not compare keys with different hash codes via eql?"
fails "Hash#== first compares keys via hash"
fails "Hash#== does not compare values when keys don't match"

fails "Hash#eql? compares the values in self to values in other hash"
fails "Hash#eql? returns true iff other Hash has the same number of keys and each key-value pair matches"
fails "Hash#eql? compares keys with matching hash codes via eql?"
fails "Hash#eql? compares keys with eql? semantics"
fails "Hash#eql? computes equality for recursive hashes & arrays"
fails "Hash#eql? computes equality for complex recursive hashes"
fails "Hash#eql? does not compare keys with different hash codes via eql?"
fails "Hash#eql? first compares keys via hash"
fails "Hash#eql? does not compare values when keys don't match"

fails "Hash#[] calls subclass implementations of default"
fails "Hash#[] does not create copies of the immediate default value"
fails "Hash#[] compares keys with eql? semantics"
Expand Down
2 changes: 2 additions & 0 deletions spec/rubyspecs
Expand Up @@ -164,6 +164,8 @@ core/hash/each_value_spec
core/hash/element_reference_spec
core/hash/element_set_spec
core/hash/empty_spec
core/hash/eql_spec
core/hash/equal_value_spec
core/hash/fetch_spec
core/hash/flatten_spec
core/hash/has_key_spec
Expand Down

0 comments on commit 5dddee5

Please sign in to comment.