&tag(MiniTest);
bundle exec rake test
| テストの名前 | 英語名 | テストフォルダ | 役割 |
| 単体テスト | unit test | test/models | メソッドごとのテスト |
| 機能テスト | functional test | test/functional | 1つのコントローラーに含まれる複数のアクションをテスト |
| 結合テスト | integration test | test/integration | 複数のコントローラー同士のやりとりをテスト |
class ArticlesControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:articles)
end
end
bundle gem sampleapp -b --test=minitest
bundle exec rake test TEST=test/sample_test.rb
bundle exec rake test TEST=test/sample_test.rb TESTOPTS="--name=test_sample_2"