diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-03-22 16:25:48 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-03-22 16:25:48 -0700 |
commit | b4115fdbc0599d80103d66e56595f9f876087ae5 (patch) | |
tree | cdfe881b6134ae38eb2cba018289112d144cb9aa | |
parent | fad83d8cbbbd0862a758a1c09c7dcc6f74a25d60 (diff) | |
download | rails-b4115fdbc0599d80103d66e56595f9f876087ae5.tar.gz rails-b4115fdbc0599d80103d66e56595f9f876087ae5.tar.bz2 rails-b4115fdbc0599d80103d66e56595f9f876087ae5.zip |
properly namespace the fixture exception
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 8 | ||||
-rw-r--r-- | activerecord/test/cases/fixtures_test.rb | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 5c42e8f719..9796b0a321 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -4,16 +4,12 @@ require 'zlib' require 'active_support/dependencies' require 'active_support/core_ext/object/blank' require 'active_record/fixtures/file' +require 'active_record/errors' -if defined? ActiveRecord +module ActiveRecord class FixtureClassNotFound < ActiveRecord::ActiveRecordError #:nodoc: end -else - class FixtureClassNotFound < StandardError #:nodoc: - end -end -module ActiveRecord # \Fixtures are a way of organizing data that you want to test against; in short, sample data. # # They are stored in YAML files, one file per model, which are placed in the directory diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index 562b370c97..e660b2ca35 100644 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -514,7 +514,7 @@ class InvalidTableNameFixturesTest < ActiveRecord::TestCase self.use_transactional_fixtures = false def test_raises_error - assert_raise FixtureClassNotFound do + assert_raise ActiveRecord::FixtureClassNotFound do funny_jokes(:a_joke) end end |