Sha256: 2fb8956eb840caccffb5a4aac99a2b0f4e8593f3dea95cdea30a599941fe786f

Contents?: true

Size: 782 Bytes

Versions: 2

Compression:

Stored size: 782 Bytes

Contents

require 'spec_helper'
describe ActiveRecord::ConnectionAdapters::Mysql2Adapter do
  describe '#fetch_full_table_name' do
    it "should return a string consisting of the schema name, a '.' and the table_name" do
      Fruit.connection.fetch_full_table_name('fruits').should eql('cm_test.fruits')
    end
  end

  describe '#table_exists?' do
    it "should return true for unquoted full_names" do
      Fruit.connection.table_exists?('cm_test.fruits').should be_true
    end
     it "should return true for table only names" do
      Fruit.connection.table_exists?('fruits').should be_true
    end
  end
end
describe ActiveRecord::Base do
  describe '#arel_table' do
    it "should use quote_table_name" do
      Fruit.arel_table.name.should eql('cm_test.fruits')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
connection_manager-1.0.3 spec/lib/patches/cross_schema_path_spec.rb
connection_manager-1.0.2 spec/lib/patches/cross_schema_path_spec.rb