【Ruby on Rails】RSpecとFactoryBotとShoulda MatchersとCapybaraを導入メモ
RSpec設定
ruby:Gemfile
group :test do
gem 'rspec-rails'
end
rails g rspec:install
:.rspec
--require spec_helper
--format documentation
ruby:config/application.rb
config.generators do |g|
g.test_framework :rspec,
fixtures: false,
controller_specs: false,
view_specs: false,
helper_specs: false,
decorator_specs: false,
routing_specs: false
Spring設定
ruby:Gemfile
group :test do
...
Updated by Yuto at 2022-09-19 06:00