title: undefined method create for RSpec rails 5
body: <p><a href="https://stackoverflow.com/questions/33829440/undefined-method-create-rails-spec">This</a> may a possible duplicate however it did not work for me.
  Please let me know what did I miss.</p>
  
  <p><strong>Config details:</strong></p>
  
  <pre><code>#Gemfile
  gem 'factory_bot_rails' # 4.8.2
  
  #spec/rails_helper.rb
  RSpec.configure do |config|
    config.include FactoryBot::Syntax::Methods
    #other config
  end
  </code></pre>
  
  <p><strong>spec/factories/otps.rb</strong></p>
  
  <pre><code>FactoryBot.define do
    factory :otp do
      phone { Faker::Number.number(10) }
      expiry { Time.now + Otp::Constants::EXPIRY_DURATION }
      password { Faker::Number.number(4) }
    end
  end
  </code></pre>
  
  <p><strong>spec/requests/authentication_controller_spec.rb</strong></p>
  
  <pre><code>require 'spec_helper'
  RSpec.describe "Authentication", :type =&gt; :request do
    describe "when invalid OTP is passed" do
      it "should return bad request" do
        otp = create(:otp) # ===&gt; Throws error
      end
    end
  end
  </code></pre>