2019-10-10から1日間の記事一覧
deviseをRspecでテストしているときにタイトルのようなエラーが出たので 解決策 spec/rails_helper.rb RSpec.configure do |config| config.include Devise::Test::ControllerHelpers, type: :controller #この一行を追加する end 参考: 【Rails4】Devise::M…
rspecでモデルのテストを書いているのだかassociationしているpost modelについて書き方がわかったのでメモしておく。 モデル側 class User < ApplicationRecord has_many :posts end class Post < ApplicationRecord belongs_to :user end の場合 FactoryBo…
文字通りUse Selenium::WebDriver::Chrome::Service#driver_path と書いてあるので group :text do - gem 'chromedriver-helper' + gem 'webdrivers' end これでエラーが出なくなります 参考: Selenium [DEPRECATION] Selenium::WebDriver::Chrome#driver_p…