Permalink
Browse files

properly namespace the fixture exception

  • Loading branch information...
1 parent fad83d8 commit b4115fdbc0599d80103d66e56595f9f876087ae5 @tenderlove tenderlove committed Mar 22, 2012
Showing with 3 additions and 7 deletions.
  1. +2 −6 activerecord/lib/active_record/fixtures.rb
  2. +1 −1 activerecord/test/cases/fixtures_test.rb
@@ -4,16 +4,12 @@
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
@@ -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

0 comments on commit b4115fd

Please sign in to comment.