日本語自由帳
id:hsmdlily
第7章「タスクB:検証とユニットテスト」
こんばんは。 今日は昨日に引き続き、本の第7章を進めていました。 というか進められませんでした。 モデルのユニットテスト まずは「depot/app/models/product.rb」から class Product < ActiveRecord::Base # Title, Description, Image_urlが空でないことを検証 validates :title, :description, :image_url, presence:…