Sha256: e9e2220fdc9eacd544e6e72dfd126d8c94a5837ac03a6785674cabdfabf19b3f
Contents?: true
Size: 1.16 KB
Versions: 2
Compression:
Stored size: 1.16 KB
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 "instantiates 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 describe "has method 'fos_dbr' that" do before :all do hash = {:host=>'hrkdm.pcmt.local', :user=>'datamart', :password=>'datap@ss', :database=>'dbr'} @db = Sequel.fos_dbr(hash) end it "instantiates dbr/mysql db from hash of params name" do @db.should_not be nil end it "actually works to see dbr tables" do TripLeg.db=@db TripLeg.first.should_not be nil Aircraft.db=@db TripLeg.first.aircraft.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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fossil-0.5.5 | spec/sequel/core_patch_spec.rb |
fossil-0.5.3 | spec/sequel/core_patch_spec.rb |