If I add:
config.include FactoryBot::Syntax::Methods
under
RSpec.configure do |config|
and run rspec, I see this error:
/Users/perry_mac/rails_projects/mymri/spec/spec_helper.rb:21:in `block in ': uninitialized constant FactoryBot (NameError)
my gemfile.lock can be seen in this pastebin
my gemfile can be seen in this pastebin
If I omit the Rspec.configure statement, my tests all run fine. I'd like to make use of the abbreviated syntax, but am not sure what I am doing wrong here.
Note: FactoryBot was previously called FactoryGirl
gem 'factory_girl_rails'
does the gem present in Gemfile ? – Centonzerequire File.expand_path("../../config/environment", __FILE__)
– Centonzegem teleporter
and then runrails g initial:rspec_base
but commit your changes before running. Source code here: github.com/itsNikolay/teleporter – Centonze