From d09b67cfc0df87e39b257409fad72f7bb6d72a41 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sat, 10 Dec 2011 15:32:14 -0800 Subject: Errno::ENOENT error makes more sense when a file cannot be found --- activerecord/lib/active_record/fixtures.rb | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index cad9417216..c33b37b0ab 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -22,8 +22,6 @@ else end end -class FixturesFileNotFound < StandardError; end - module ActiveRecord # \Fixtures are a way of organizing data that you want to test against; in short, sample data. # @@ -644,14 +642,6 @@ module ActiveRecord end def read_fixture_files - if ::File.file?(yaml_file_path) - read_yaml_fixture_files - else - raise FixturesFileNotFound, "Could not find #{yaml_file_path}" - end - end - - def read_yaml_fixture_files yaml_files = Dir["#{@fixture_path}/**/*.yml"].select { |f| ::File.file?(f) } + [yaml_file_path] -- cgit v1.2.3