This file contains 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
# match hashes with indifferent access | |
# | |
# example) | |
# expect({"key1" => 1, :key2 => 2}).to equal_with_indifferent_access(key1: 1, key2: 2) | |
RSpec::Matchers.define :eq_with_indifferent_access do |expected| | |
match do |actual| | |
actual.with_indifferent_access == expected.with_indifferent_access | |
end |