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.50 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.49 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.48 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.47 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.46 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.45 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.44 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.43 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.42 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.41 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.40 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.39 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.38 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.37 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.36 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.35 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.34 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.33 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.32 spec_dbr/sequel/core_patch_spec.rb
fossil-0.5.31 spec_dbr/sequel/core_patch_spec.rb