Sha256: a686683e42691e10fb22a212b625f721b6672e70fabd6a61dae6b66bb5546cda
Contents?: true
Size: 755 Bytes
Versions: 1
Compression:
Stored size: 755 Bytes
Contents
require 'spec_helper' describe Hash do before do Github.new @nested_hash = { 'a' => { 'b' => {'c' => 1 } } } @symbols = { :a => { :b => { :c => 1 } } } end it "should respond to except" do @nested_hash.should respond_to :except end it "should respond to except!" do @nested_hash.should respond_to :except! end it "should respond to symbolize_keys!" do @nested_hash.should respond_to :symbolize_keys! end it "should respond to symbolize_keys" do @nested_hash.should respond_to :symbolize_keys end it "should remove key from the hash" do @nested_hash.except('a').should be_empty end it "should convert nested keys to symbols" do @nested_hash.symbolize_keys!.should == @symbols end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
github_api-0.1.2 | spec/github/core_ext/hash_spec.rb |