aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/performance_testing.textile
diff options
context:
space:
mode:
authorGonçalo Silva <goncalossilva@gmail.com>2011-03-29 22:41:49 +0100
committerGonçalo Silva <goncalossilva@gmail.com>2011-03-29 22:41:49 +0100
commitbe0a2b8f01732bacaa652eff6f286112ace2adca (patch)
tree0cdf86ab4934cfb65fd3113118e5eb6391f5f052 /railties/guides/source/performance_testing.textile
parent6f0caa1a534a065753d51430b649114bc8bf54ac (diff)
downloadrails-be0a2b8f01732bacaa652eff6f286112ace2adca.tar.gz
rails-be0a2b8f01732bacaa652eff6f286112ace2adca.tar.bz2
rails-be0a2b8f01732bacaa652eff6f286112ace2adca.zip
performance tests inherit from AD::PT and not AC::PT, fixed performance test generator invocation (guide)
Diffstat (limited to 'railties/guides/source/performance_testing.textile')
-rw-r--r--railties/guides/source/performance_testing.textile12
1 files changed, 6 insertions, 6 deletions
diff --git a/railties/guides/source/performance_testing.textile b/railties/guides/source/performance_testing.textile
index 5679bae531..c9d494b150 100644
--- a/railties/guides/source/performance_testing.textile
+++ b/railties/guides/source/performance_testing.textile
@@ -23,7 +23,7 @@ require 'test_helper'
require 'rails/performance_test_help'
# Profiling results for each test method are written to tmp/performance.
-class BrowsingTest < ActionController::PerformanceTest
+class BrowsingTest < ActionDispatch::PerformanceTest
def test_homepage
get '/'
end
@@ -34,10 +34,10 @@ This example is a simple performance test case for profiling a GET request to th
h4. Generating Performance Tests
-Rails provides a generator called +test_unit:performance+ for creating new performance tests:
+Rails provides a generator called +performance_test+ for creating new performance tests:
<shell>
-$ rails generate test_unit:performance homepage
+$ rails generate performance_test homepage
</shell>
This generates +homepage_test.rb+ in the +test/performance+ directory:
@@ -46,7 +46,7 @@ This generates +homepage_test.rb+ in the +test/performance+ directory:
require 'test_helper'
require 'rails/performance_test_help'
-class HomepageTest < ActionController::PerformanceTest
+class HomepageTest < ActionDispatch::PerformanceTest
# Replace this with your real tests.
def test_homepage
get '/'
@@ -105,7 +105,7 @@ Here's the performance test for +HomeController#dashboard+ and +PostsController#
require 'test_helper'
require 'rails/performance_test_help'
-class PostPerformanceTest < ActionController::PerformanceTest
+class PostPerformanceTest < ActionDispatch::PerformanceTest
def setup
# Application requires logged-in user
login_as(:lifo)
@@ -133,7 +133,7 @@ Performance test for +Post+ model:
require 'test_helper'
require 'rails/performance_test_help'
-class PostModelTest < ActionController::PerformanceTest
+class PostModelTest < ActionDispatch::PerformanceTest
def test_creation
Post.create :body => 'still fooling you', :cost => '100'
end