title: Cannot test class inside module[uninitialized constant] Rspec
body: <p>This is my authentication file:</p>
  
  <pre><code>module Command
    class AuthenticateUser
      prepend SimpleCommand
      ...
    end
  end
  </code></pre>
  
  <p>And then I made a test with this:</p>
  
  <pre><code>require 'rails_helper'
  
  RSpec.describe Command::AuthenticateUser do
  
   ...
  end
  </code></pre>
  
  <p>When I ran the test, got this error:</p>
  
  <pre><code># --- Caused by: ---
  # NameError:
  #   uninitialized constant Command
  #   ./spec/commands/authenticate_user_spec.rb:3:in `&lt;top (required)&gt;'
  </code></pre>
  
  <p>Not sure where is the problem with my code, could you give some suggestions Thanks in advance.</p>