Skip to content
This repository
Browse code

properly namespace the fixture exception

  • Loading branch information...
commit b4115fdbc0599d80103d66e56595f9f876087ae5 1 parent fad83d8
Aaron Patterson tenderlove authored
8 activerecord/lib/active_record/fixtures.rb
@@ -4,16 +4,12 @@
4 4 require 'active_support/dependencies'
5 5 require 'active_support/core_ext/object/blank'
6 6 require 'active_record/fixtures/file'
  7 +require 'active_record/errors'
7 8
8   -if defined? ActiveRecord
  9 +module ActiveRecord
9 10 class FixtureClassNotFound < ActiveRecord::ActiveRecordError #:nodoc:
10 11 end
11   -else
12   - class FixtureClassNotFound < StandardError #:nodoc:
13   - end
14   -end
15 12
16   -module ActiveRecord
17 13 # \Fixtures are a way of organizing data that you want to test against; in short, sample data.
18 14 #
19 15 # They are stored in YAML files, one file per model, which are placed in the directory
2  activerecord/test/cases/fixtures_test.rb
@@ -514,7 +514,7 @@ class InvalidTableNameFixturesTest < ActiveRecord::TestCase
514 514 self.use_transactional_fixtures = false
515 515
516 516 def test_raises_error
517   - assert_raise FixtureClassNotFound do
  517 + assert_raise ActiveRecord::FixtureClassNotFound do
518 518 funny_jokes(:a_joke)
519 519 end
520 520 end

0 comments on commit b4115fd

Please sign in to comment.
Something went wrong with that request. Please try again.