20. デフォルトの
ユニットテストコード
require 'test_helper'
class EntryTest < ActiveSupport::TestCase
# Replace this with your real tests.
def test_truth
assert true
end
end
必ず成功するダミーのテストが
自動生成されている
test/unit/entry_test.rb
trueは必ずtrue
常にアサーションどおり
20
40. map.resources :entries
意味
HTTP
メソッド
URL アクション
一覧 GET /entries index
登録フォーム表示 GET /entries/new new
登録 POST /entries create
IDが17の記事を表示 GET /entries/17 show
IDが17の記事の
変更フォーム表示
GET /entries/17/edit edit
IDが17の記事を変更 PUT /entries/17 update
IDが17の記事を削除 DELETE /entries/17 destroy
コントローラ:EntriesController
40