I am just learning Rails testing and I am not able to run ANY tests (even the "assert true" examples) because I get an error from an unrelated model not being able to load a custom config file variable.
My app has a custom config file loaded per this Railscast episode (http://railscasts.com/episodes/85-yaml-configuration-file) in environment.rb
APP_CONFIG = YAML.load_file("#{::Rails.root.to_s}/config/config.yml")[RAILS_ENV]
Thats fine in the normal app but in testing it is not loading it in a model:
has_attached_file :photo,
:bucket => APP_CONFIG['s3_bucket']
Console error: `const_missing_from_s3_library': uninitialized constant Asset::APP_CONFIG (NameError)
(It should be noted that is NOT the same model I am trying to test but I guess the testing environment runs the whole app?)
What is different about the testing environment where it won't run environment.rb?