title: NameError: uninitialized constant, with RSpec
body: <p>I'm trying to test my Jenkins Ruby plugin with RSpec.<br>
  My emailcomputerlistener.rb:  </p>
  
  <pre><code>require 'net/smtp'
  class EmailComputerListener
    include Jenkins::Slaves::ComputerListener
    def online(computer, listener)
      [...]
    end
  end
  </code></pre>
  
  <p>My emailcomputerlistener_spec.rb  </p>
  
  <pre><code>require 'emailcomputerlistener'
  require 'computer' # overloaded class for computer
  require 'smtp'     # overloaded smtp class
  require 'computerlistener' # required?
  
  describe EmailComputerListener do
    before :each do
      @ecl = EmailComputerListener.new
      [...]
    end
  [tests]
  end
  </code></pre>
  
  <p>When running RSpec, it says:  </p>
  
  <pre><code>NameError: uninitialized constant EmailComputerListener::Jenkins
  [row 3]
  </code></pre>
  
  <p>All files are in the same directory, I have been running my tests on a separate emailcomputerlistener with the include statement commented out to make the tests pass. But it would be better to test the original file obviously.</p>
  
  <p>Edit: The test do not rely on Jenkins::Slaves::ComputerListener, nor should they, ComputerListener is defined in a gem I'm bundling my plugin with. All I'm trying to do is simulating this file, I cannot add a <code>require 'computerlistener'</code> in EmailComputerListener since doing so would probably break the plugin.</p>
  
  <p>Thanks.</p>