Sha256: 7e21354ee9898e122ba9d6a71d81cf246912d12e50ef1166d33b0506439781b5
Contents?: true
Size: 679 Bytes
Versions: 34
Compression:
Stored size: 679 Bytes
Contents
require File.join(File.dirname(__FILE__), "..", "spec_helper.rb") describe Hash do before :all do @item = {:a => "a key", :c => "another key"} end describe "transformations" do it "should be renamable" do @item.should respond_to(:rename) end it "should have a transform object" do @item.rename(:a => :b).should == {:b => "a key", :c => "another key"} end it "should rename many keys" do @item.rename(:a => :b, :c => :d).should == {:b => "a key", :d => "another key"} end it "should symbolise string keys" do {"a" => {"b" => "bee"}}.symbolize_keys!.should == {:a => {:b => "bee"}} end end end
Version data entries
34 entries across 34 versions & 2 rubygems