-
Notifications
You must be signed in to change notification settings - Fork 4
spork
mechamogera edited this page Jun 4, 2012
·
3 revisions
- spork、spork-testunitをGemfileに追加
- gemインストール
bundle install
- spork設定追加
bundle exec spork --bootstrap
- test_helper.rbにspork用の設定が追加
- spork起動
- 1つのコンソールでRAILS_ROOTに移動
spork
- テストの実行
- 他のコンソールでRAILS_ROOTに移動
testdrb [テスト対象のファイル]
- 例:
testdrb test/functional/*/*.rb
- テスト対象コード:sample_blog
- 通常のテスト実行による時間計測
$ time ruby test/functional/reports_controller_test.rb
Loaded suite test/functional/reports_controller_test
Started
...............
Finished in 0.527000 seconds.
15 tests, 29 assertions, 0 failures, 0 errors, 0 skips
Test run options: --seed 23823
real 0m5.665s
user 0m5.216s
sys 0m0.405s
- sporkによる時間計測
$ time testdrb test/functional/reports_controller_test.rb
Loaded suite reports_controller_test
Started
...............
Finished in 0.531248 seconds.
15 tests, 29 assertions, 0 failures, 0 errors, 0 skips
Test run options: --seed 48319
real 0m1.507s
user 0m0.088s
sys 0m0.028s