diff options
author | Damien Mathieu <damien.mathieu@lim.eu> | 2010-08-31 13:39:08 +0200 |
---|---|---|
committer | Damien Mathieu <damien.mathieu@lim.eu> | 2010-08-31 13:39:08 +0200 |
commit | 28474a7571b6a72f4a9433edf7c5212cf90c3938 (patch) | |
tree | c047cb0ca31c5be5e7f63b39a66c1ae14f0cb9cb /railties/guides/source/performance_testing.textile | |
parent | c2ed4a9f88c9a5892dee4ed3dfde65e692763e9f (diff) | |
download | rails-28474a7571b6a72f4a9433edf7c5212cf90c3938.tar.gz rails-28474a7571b6a72f4a9433edf7c5212cf90c3938.tar.bz2 rails-28474a7571b6a72f4a9433edf7c5212cf90c3938.zip |
Fix benchmarking for rails3
* Fix the generated file examples
* Fix the generators commands
Diffstat (limited to 'railties/guides/source/performance_testing.textile')
-rw-r--r-- | railties/guides/source/performance_testing.textile | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile index 7b21485ea0..9dda6d420a 100644 --- a/railties/guides/source/performance_testing.textile +++ b/railties/guides/source/performance_testing.textile @@ -20,7 +20,7 @@ In a freshly generated Rails application, +test/performance/browsing_test.rb+ co <ruby> require 'test_helper' -require 'performance_test_help' +require 'rails/performance_test_help' # Profiling results for each test method are written to tmp/performance. class BrowsingTest < ActionController::PerformanceTest @@ -34,17 +34,17 @@ This example is a simple performance test case for profiling a GET request to th h4. Generating Performance Tests -Rails provides a generator called +performance_test+ for creating new performance tests: +Rails provides a generator called +test_unit:performance+ for creating new performance tests: <shell> -rails generate performance_test homepage +rails generate test_unit:performance homepage </shell> This generates +homepage_test.rb+ in the +test/performance+ directory: <ruby> require 'test_helper' -require 'performance_test_help' +require 'rails/performance_test_help' class HomepageTest < ActionController::PerformanceTest # Replace this with your real tests. @@ -103,7 +103,7 @@ Here's the performance test for +HomeController#dashboard+ and +PostsController# <ruby> require 'test_helper' -require 'performance_test_help' +require 'rails/performance_test_help' class PostPerformanceTest < ActionController::PerformanceTest def setup @@ -131,7 +131,7 @@ Performance test for +Post+ model: <ruby> require 'test_helper' -require 'performance_test_help' +require 'rails/performance_test_help' class PostModelTest < ActionController::PerformanceTest def test_creation |