diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-09 04:37:46 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-09 04:37:46 +0000 |
commit | 77de690a56b52909d45c300fd37b452c19fbb81e (patch) | |
tree | 3e61d1119e69c2d6f853fbc560748130562cbead /activerecord | |
parent | 2c951efed3bada5ee5df764926ca90d19a7863c0 (diff) | |
download | rails-77de690a56b52909d45c300fd37b452c19fbb81e.tar.gz rails-77de690a56b52909d45c300fd37b452c19fbb81e.tar.bz2 rails-77de690a56b52909d45c300fd37b452c19fbb81e.zip |
Be careful not to reference ActiveRecord if it isn't loaded, fixing rake test when you're working without a database. [eedn]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8339 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/lib/active_record/fixtures.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 40fbadc233..7a00b5bb56 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -9,7 +9,12 @@ module YAML #:nodoc: end end -class FixtureClassNotFound < ActiveRecord::ActiveRecordError #:nodoc: +if defined? ActiveRecord + class FixtureClassNotFound < ActiveRecord::ActiveRecordError #:nodoc: + end +else + class FixtureClassNotFound < StandardError #:nodoc: + end end # Fixtures are a way of organizing data that you want to test against; in short, sample data. They come in 3 flavors: |