title: Constant Uninitialized in Rspec
body: <p>I created a constant that includes my API key for an app I'm working on. It's working in the rails console, but I'm having a hard time getting this to work in my tests. I have to use Bing so I added the API like so:</p>
  
  <pre><code># config/bing.yml
  development:
    secret: 1234
  
  test:
    secret: 5678
  
  production:
    secret: abcd
  
  # config/initializers/bing.rb
  BING_CONFIG = YAML.load_file("#{::Rails.root}/config/bing.yml")[::Rails.env]
  </code></pre>
  
  <p>How would I ensure that <code>BING_CONFIG</code> loads into rspec? Currently, it's working and loading fine in the my rails console, but when I run my specs, I get the following error:</p>
  
  <pre><code>uninitialized constant SearchEngine::BING_CONFIG
  </code></pre>