Sha256: 52f80de139819148c102637110930f3f911d643ded3939c79affcf8296f7e9d7

Contents?: true

Size: 553 Bytes

Versions: 21

Compression:

Stored size: 553 Bytes

Contents

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

describe Sequel do

  describe "has method 'fos_dbr' that" do
    before :each do
      hash = {:host=>"localhost", :user=>'root', :password=>'', :database=>'test'}
      @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 loaded the dbr files" do
      [Trip, Quote].each { |model| model.db=@db }
      Trip.eager_graph(:quote).sql.should =~ /(`quote`.`id` = `trips`.`quote_id`)/
    end
  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
fossil-0.5.30 spec_dbr/sequel/core_patch_spec.rb