I\'m writing tests on Rspec for my models in Ruby on Rails application. And I receive this error while starting \'rspec spec\'
command: /spec/models/client_spec
Factories folder define in your app
FactoryBot.define do factory :user_params , :class => 'User' do username 'Alagesan' password '$1234@..' end end
Your Controller RSpec file:
it 'valid params' do post :register, params: {:user => user_params } end