Skip to content
This repository
Browse code

Fix benchmarking for rails3

* Fix the generated file examples
* Fix the generators commands
  • Loading branch information...
commit 031b60d2707d2559cd2cd5f162fe69cac4656e2f 1 parent 63306de
Damien Mathieu authored fxn committed

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. +6 6 railties/guides/source/performance_testing.textile
12 railties/guides/source/performance_testing.textile
Source Rendered
@@ -20,7 +20,7 @@ In a freshly generated Rails application, +test/performance/browsing_test.rb+ co
20 20
21 21 <ruby>
22 22 require 'test_helper'
23   -require 'performance_test_help'
  23 +require 'rails/performance_test_help'
24 24
25 25 # Profiling results for each test method are written to tmp/performance.
26 26 class BrowsingTest < ActionController::PerformanceTest
@@ -34,17 +34,17 @@ This example is a simple performance test case for profiling a GET request to th
34 34
35 35 h4. Generating Performance Tests
36 36
37   -Rails provides a generator called +performance_test+ for creating new performance tests:
  37 +Rails provides a generator called +test_unit:performance+ for creating new performance tests:
38 38
39 39 <shell>
40   -rails generate performance_test homepage
  40 +rails generate test_unit:performance homepage
41 41 </shell>
42 42
43 43 This generates +homepage_test.rb+ in the +test/performance+ directory:
44 44
45 45 <ruby>
46 46 require 'test_helper'
47   -require 'performance_test_help'
  47 +require 'rails/performance_test_help'
48 48
49 49 class HomepageTest < ActionController::PerformanceTest
50 50 # Replace this with your real tests.
@@ -103,7 +103,7 @@ Here's the performance test for +HomeController#dashboard+ and +PostsController#
103 103
104 104 <ruby>
105 105 require 'test_helper'
106   -require 'performance_test_help'
  106 +require 'rails/performance_test_help'
107 107
108 108 class PostPerformanceTest < ActionController::PerformanceTest
109 109 def setup
@@ -131,7 +131,7 @@ Performance test for +Post+ model:
131 131
132 132 <ruby>
133 133 require 'test_helper'
134   -require 'performance_test_help'
  134 +require 'rails/performance_test_help'
135 135
136 136 class PostModelTest < ActionController::PerformanceTest
137 137 def test_creation

0 comments on commit 031b60d

Please sign in to comment.
Something went wrong with that request. Please try again.