Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

use a real test

git-svn-id: 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 9898a62bf79f5a4f6250b2ee17583d0f44ee1bc5 1 parent 133fe85
@jeremy jeremy authored
Showing with 6 additions and 9 deletions.
  1. +6 −9 activerecord/test/associations_test.rb
15 activerecord/test/associations_test.rb
@@ -11,20 +11,17 @@
require 'fixtures/post'
require 'fixtures/author'
-# Can't declare new classes in test case methods, so tests before that
-bad_collection_keys = false
- class Car < ActiveRecord::Base; has_many :wheels, :name => "wheels"; end
-rescue ArgumentError
- bad_collection_keys = true
-raise "ActiveRecord should have barked on bad collection keys" unless bad_collection_keys
class AssociationsTest < Test::Unit::TestCase
fixtures :accounts, :companies, :developers, :projects, :developers_projects,
+ def test_bad_collection_keys
+ assert_raise(ArgumentError, 'ActiveRecord should have barked on bad collection keys') do
+, :name => 'wheels')
+ end
+ end
def test_force_reload
firm ="name" => "A New Firm, Inc")
Please sign in to comment.
Something went wrong with that request. Please try again.