Sha256: 6eb7a327ad9b64aeb0f7212b4e69fd595a3ba19b07288774579ecf3e0bb387cc

Contents?: true

Size: 691 Bytes

Versions: 4

Compression:

Stored size: 691 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe Sequel do

  describe "has method 'fos' that" do
    before :all do
      @db = Sequel.fos('fos')
    end

    it "instantiate a fos/pervasive db from an odbc name" do
      @db.should_not be nil
    end

    it "actually works to see a fos table" do
      TripLeg.db=@db
      TripLeg.first.should_not be nil
    end
  end

  it "set_db method finds sets db on all Sequel models" do
    db = Sequel.fos('fos')
    Sequel.set_db db
    Trip.db.should == db
  end

  it "converts fos_id to key that can be used to query model" do
    Sequel.fos_id_to_lookup_key("MERE-0-8-40443-1259").should == ['MERE',0,8,40443,1259]
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fossil-0.5.2 spec/sequel/core_patch_spec.rb
fossil-0.5.1 spec/sequel/core_patch_spec.rb
fossil-0.5.0 spec/sequel/core_patch_spec.rb
fossil-0.4.26 spec/sequel/core_patch_spec.rb