Sha256: b377569d2baa9759db15f0256ac757fe2d530b9637186d9ad68d0bd2f9c58a45

Contents?: true

Size: 412 Bytes

Versions: 6

Compression:

Stored size: 412 Bytes

Contents

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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fathom-0.3.7 spec/ext/open_struct_spec.rb
fathom-0.3.6 spec/ext/open_struct_spec.rb
fathom-0.3.4 spec/ext/open_struct_spec.rb
fathom-0.3.3 spec/ext/open_struct_spec.rb
fathom-0.3.2 spec/ext/open_struct_spec.rb
fathom-0.3.1 spec/ext/open_struct_spec.rb