2018-10-03から1日間の記事一覧
やりたいこと Rspec において、FactoryBot.create(:hoge) の FactoryBot を毎度記述せずに create(:hoge) と書きたい。 結論 rails_helper.rb に下記を加えれば良い。 config.include FactoryBot::Syntax::Methods 参考 https://github.com/thoughtbot/facto…
やりたいこと Rspec において、FactoryBot.create(:hoge) の FactoryBot を毎度記述せずに create(:hoge) と書きたい。 結論 rails_helper.rb に下記を加えれば良い。 config.include FactoryBot::Syntax::Methods 参考 https://github.com/thoughtbot/facto…