Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

properly namespace the fixture exception

  • Loading branch information...
commit b4115fdbc0599d80103d66e56595f9f876087ae5 1 parent fad83d8
@tenderlove tenderlove authored
View
8 activerecord/lib/active_record/fixtures.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
View
2  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
Please sign in to comment.
Something went wrong with that request. Please try again.