Sha256: 27c9252115e0be193400504ca9421e5ffd64777199bb487e877a4ba5ac021ff0
Contents?: true
Size: 849 Bytes
Versions: 5
Compression:
Stored size: 849 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) module Noe describe "Hash#methodize!" do let(:thehash){ { 'name' => "Noe", :version => Noe::VERSION, 'subhash' => { 'entry' => 12 }, 'subarray' => [ { 'entry' => 12 } ] } } it "should be recursive by default" do thehash.methodize! thehash.name.should == "Noe" thehash.version.should == Noe::VERSION thehash.subhash.entry.should == 12 thehash.subarray[0].entry.should == 12 end it "should noe recursive if explicitely said" do thehash.methodize!(false) thehash.name.should == "Noe" thehash.version.should == Noe::VERSION thehash.subhash.should == {'entry' => 12} lambda{ thehash.subhash.entry }.should raise_error end end end # module Noe
Version data entries
5 entries across 3 versions & 1 rubygems