Sha256: f4c31b0633bbfb2dc77b7fb1ec32fd0b439714e099d5ec8e57181fb280067d03
Contents?: true
Size: 512 Bytes
Versions: 2
Compression:
Stored size: 512 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe Suhyo::HashMatchers do include Suhyo::HashMatchers describe '#include_hash' do it 'matches if the target hash includes each pair in the expected hash' do {:a => 1, :b => 2, :c => 3, :d => 4}.should include_hash(:a => 1, :c => 3) end it 'does not match if the target hash is missing one of the pairs in the expected hash' do {:a => 1, :b => 2, :c => 3, :d => 4}.should_not include_hash(:a => 2, :c => 3) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
suhyo-0.0.6 | spec/hash_matchers_spec.rb |
suhyo-0.0.5 | spec/hash_matchers_spec.rb |