Permalink
Browse files

raise when neither test nor spec was found...

  • Loading branch information...
1 parent 07418dc commit 8284a0107307cc8cc0d22cb6d89a818ca548b8fe @grosser committed Feb 26, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/valid_attributes.rb
@@ -57,8 +57,9 @@ def self.valid_attributes(record_name)
def self.path_to_valid_yml
%w[test spec].each do |folder|
- file = File.join(RAILS_ROOT,'test','valid_attributes.yml')
+ file = File.join(RAILS_ROOT,folder,'valid_attributes.yml')
return file if File.exist?(file)
end
+ raise "create valid_attributes.yml in test/ or spec/"
end
end

0 comments on commit 8284a01

Please sign in to comment.