Skip to content

Commit

Permalink
properly namespace the fixture exception
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Mar 22, 2012
1 parent fad83d8 commit b4115fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions activerecord/lib/active_record/fixtures.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/fixtures_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit b4115fd

Please sign in to comment.