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

Ticket #11425: fixes_for_active_record_test_run_by_hand.diff

File fixes_for_active_record_test_run_by_hand.diff, 2.2 kB (added by thechrisoshow, 8 months ago)

Fixes for activerecord tests so that they can be run with rake test_mysql TEST=blah

  • activerecord/test/cases/associations_test.rb

    old new  
    13231323 
    13241324class BelongsToAssociationsTest < ActiveRecord::TestCase 
    13251325  fixtures :accounts, :companies, :developers, :projects, :topics, 
    1326            :developers_projects, :computers, :authors, :posts, :tags, :taggings 
     1326           :developers_projects, :computers, :authors, :posts, :tags, :taggings, :comments 
    13271327 
    13281328  def test_belongs_to 
    13291329    Client.find(3).firm.name 
  • activerecord/test/cases/fixtures_test.rb

    old new  
    355355  end 
    356356end 
    357357 
    358 class SetTableNameFixturesTest < ActiveRecord::TestCase 
     358class CheckSetTableNameFixturesTest < ActiveRecord::TestCase 
    359359  set_fixture_class :funny_jokes => 'Joke' 
    360360  fixtures :funny_jokes 
    361361 
  • activerecord/test/cases/base_test.rb

    old new  
    11require "cases/helper" 
     2require 'models/author'  
    23require 'models/topic' 
    34require 'models/reply' 
     5require 'models/category'  
    46require 'models/company' 
    57require 'models/customer' 
    68require 'models/developer' 
     
    1113require 'models/subscriber' 
    1214require 'models/keyboard' 
    1315require 'models/post' 
     16require 'models/comment' 
    1417require 'models/minimalistic' 
    1518require 'models/warehouse_thing' 
    1619require 'rexml/document' 
  • activerecord/RUNNING_UNIT_TESTS

    old new  
    2525Unit tests are located in test/cases directory. If you only want to run a single test suite,  
    2626you can do so with: 
    2727 
    28    rake test_mysql TEST=base_test.rb 
     28   rake test_mysql TEST=test/cases/base_test.rb 
    2929    
    3030That'll run the base suite using the MySQL-Ruby adapter. 
    3131