Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 7930

Show
Ignore:
Timestamp:
10/16/07 05:05:22 (1 year ago)
Author:
bitsweat
Message:

Moving SQL Server tests to the extracted adapter. References #9884.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/Rakefile

    r7912 r7930  
    2929task :test => %w(test_mysql test_sqlite test_sqlite3 test_postgresql) 
    3030 
    31 for adapter in %w( mysql postgresql sqlite sqlite3 firebird sqlserver sqlserver_odbc db2 oracle sybase openbase frontbase ) 
     31for adapter in %w( mysql postgresql sqlite sqlite3 firebird db2 oracle sybase openbase frontbase ) 
    3232  Rake::TestTask.new("test_#{adapter}") { |t| 
    3333    t.libs << "test" << "test/connections/native_#{adapter}" 
  • trunk/activerecord/test/aaa_create_tables_test.rb

    r4420 r7930  
    1010 
    1111  def test_drop_and_create_main_tables 
    12     recreate ActiveRecord::Base 
     12    recreate ActiveRecord::Base unless use_migrations? 
    1313    assert true 
    1414  end 
     
    2424   
    2525  def test_drop_and_create_courses_table 
    26     recreate Course, '2' 
     26    recreate Course, '2' unless use_migrations? 
    2727    assert true 
    2828  end 
    2929 
    3030  private 
     31    def use_migrations? 
     32      coursesSQL = ActiveRecord::Base.connection.adapter_name.downcase + "2.sql" 
     33      not File.exists? "#{@base_path}/#{coursesSQL}" 
     34    end 
     35 
    3136    def recreate(base, suffix = nil) 
    3237      connection = base.connection