aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/test/associations_extensions_test.rb
blob: fa9674a1499fd80204b0664daf25d3bc50c9d55d (plain) (tree)
1
2
3
4
5
6
7
8
                       

                          



                                                       
                                                    








                                                                                           
require 'abstract_unit'
require 'fixtures/post'
require 'fixtures/comment'
require 'fixtures/project'
require 'fixtures/developer'

class AssociationsExtensionsTest < Test::Unit::TestCase
  fixtures :projects, :developers, :comments, :posts

  def test_extension_on_habtm
    assert_equal projects(:action_controller), developers(:david).projects.find_most_recent
  end
  
  def test_extension_on_has_many
    assert_equal comments(:more_greetings), posts(:welcome).comments.find_most_recent
  end
end