Sha256: c42dd926b64bc5ba5b497fbe6cbdab0e288a043ed9412d00ad76791ff5f9af0a

Contents?: true

Size: 749 Bytes

Versions: 1

Compression:

Stored size: 749 Bytes

Contents

require 'spec_helper.rb'
require 'plaindb.rb'

if false

describe "PlainDB Table" do
  it "should create a db-table in data/plaindb/.." do
    tdef=PlaindbApp::TableDefinition.new
    tdef.add(PlaindbApp::Column::int("id"))
    tdef.add(PlaindbApp::Column::string("name"))
      
    db=PlaindbApp::DB.new("spec")
    table=db.getTable("test",tdef)
    row=PlaindbApp::Row.new(10,"bla")
    row3=PlaindbApp::Row.new(120,"bsdfdfdla")
    table.store(row,0)
    table.store(row3,1)
    row2=table.load(0)
    pp row2
    row2.should == row
    table.load(1).should == row3
    table.load(1).should_not == row
    pp table.size
  end
  
  it "should be possible to reopen a table" do
    
  end 
  
  
  private
  def getTableDef
    
  end
  
end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appswarm-0.0.1 apps/plaindb/spec/table_write_spec.rb