Sha256: 40df6ec8af95e8dab903f9ce958f353b096ce346c461065807cb2183a38fab1e
Contents?: true
Size: 474 Bytes
Versions: 13
Compression:
Stored size: 474 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' require File.dirname(__FILE__) + '/../lib/clickatell' describe Hash do it "should return only the keys specified" do hash = {:a => 'foo', :b => 'bar', :c => 'baz'} hash.only(:a, :b).should == {:a => 'foo', :b => 'bar'} end it "should return only the keys specified, ignoring keys that do not exist" do hash = {:a => 'foo', :b => 'bar', :c => 'baz'} hash.only(:a, :d).should == {:a => 'foo'} end end
Version data entries
13 entries across 13 versions & 4 rubygems