Sha256: 88bd9cf4c39c0a15bb99e317e639dedd1541e01931f5252ee0fc5234b3a9aac9

Contents?: true

Size: 303 Bytes

Versions: 8

Compression:

Stored size: 303 Bytes

Contents

require 'cape/core_ext/hash'

describe Hash do
  describe '#slice' do
    it 'should return the expected Hash' do
      hash = {:foo => 'bar', :baz => 'qux', :quux => 'corge'}
      hash.slice(:baz, :quux).should == {:baz => 'qux', :quux => 'corge'}

      {}.slice(:foo).should == {}
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cape-1.4.0 spec/cape/core_ext/hash_spec.rb
cape-1.3.0 spec/cape/core_ext/hash_spec.rb
cape-1.2.0 spec/cape/core_ext/hash_spec.rb
cape-1.1.0 spec/cape/core_ext/hash_spec.rb
cape-1.0.3 spec/cape/core_ext/hash_spec.rb
cape-1.0.2 spec/cape/core_ext/hash_spec.rb
cape-1.0.1 spec/cape/core_ext/hash_spec.rb
cape-1.0.0 spec/cape/core_ext/hash_spec.rb