require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe OpenStruct do before do @o = OpenStruct.new(:this => 1) end it "should expose its table" do @o.table.should eql({:this => 1}) end it "should expose the keys from the table" do @o.keys.should eql([:this]) end it "should expose the values from the table" do @o.values.should eql([1]) end end