Sha256: cb9c1005014401a92f71bbd8602f14166cf0616e57a950156328ea234c0c05d1
Contents?: true
Size: 574 Bytes
Versions: 53
Compression:
Stored size: 574 Bytes
Contents
require File.expand_path('spec/spec_helper') describe Ruco::OptionAccessor do let(:options){ Ruco::OptionAccessor.new } it "can be accessed like a hash" do options[:xx].should == nil options[:xx] = 1 options[:xx].should == 1 end it "can be written" do options.foo = true options[:foo].should == true end it "can access nested keys" do options.foo_bar = 1 options.history_size = 1 options.nested(:history).should == {:size => 1} end it "has empty hash for nested key" do options.nested(:history).should == {} end end
Version data entries
53 entries across 53 versions & 1 rubygems