title: Rspec and Draper : unitialized constant on class name
body: <p>On Rails 4 when I execute rspec tests for a decorator I got the following error : </p>
  
  <pre><code>/app/spec/decorators/my_decorator_spec.rb:3:in `&lt;top (required)&gt;': uninitialized constant MyDecorator (NameError)
  </code></pre>
  
  <p>I'm surely missing something but I don't know what.</p>
  
  <p>I generate the decorator</p>
  
  <pre><code>rails g decorator My
  </code></pre>
  
  <p>A spec/my_decorator_spec.rb file is generated, with the content :</p>
  
  <pre><code>require 'spec_helper'
  
  describe MyDecorator do
  end
  </code></pre>
  
  <p>Then I test</p>
  
  <pre><code>rspec spec/decorators/my_decorator_spec.rb
  </code></pre>
  
  <p>I didn't add anything in application.rb or spec_helper.rb.
  The decorator itself works correctly.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>It's weirder than I expected. When I test all rspec files, tests inside my decorator spec file are correctly executed.</p>
  
  <p>It works :</p>
  
  <pre><code>rspec spec/
  </code></pre>
  
  <p>It doesn't :</p>
  
  <pre><code>rspec spec/decorators
  rspec spec/decorators/my_decorator_spec.rb
  </code></pre>