Sha256: e1b57d57c380ca96fff4ef978eb775795706bcd6a6f86cf4c8c466b2d194a91a
Contents?: true
Size: 397 Bytes
Versions: 3
Compression:
Stored size: 397 Bytes
Contents
require 'ostruct' describe "OpenStruct#table" do before(:each) do @os = OpenStruct.new("age" => 20, "name" => "John") end it "is protected" do OpenStruct.should have_protected_instance_method(:table) end it "returns self's method/value table" do @os.send(:table).should == { :age => 20, :name => "John" } @os.send(:table)[:age] = 30 @os.age.should == 30 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubysl-ostruct-2.1.0 | spec/table_spec.rb |
rubysl-ostruct-2.0.4 | spec/table_spec.rb |
rubysl-ostruct-1.0.0 | spec/table_spec.rb |