public
Description: PLEASE CHECK http://github.com/lifo/docrails/wikis
Homepage: http://weblog.rubyonrails.org/2008/5/2/help-improve-rails-documentation-on-git-branch
Clone URL: git://github.com/lifo/docrails.git
Use test/performance/test_helper to do test setup then boost log level and 
turn on caching
jeremy (author)
Sun Jun 15 16:21:32 -0700 2008
commit  09c70a0c03aa755a66dc94ebb2b98b283c7137c9
tree    33008fcd1b46299bd0155afd19cffc05c3dba032
parent  59b2daba4f2d1eadabd3e89299114f0d77ae454d
...
1
2
3
4
 
5
6
7
...
 
 
 
 
1
2
3
4
0
@@ -1,7 +1,4 @@
0
-ENV['RAILS_ENV'] ||= 'test'
0
-require "#{File.dirname(__FILE__)}/../../config/environment"
0
-require 'test/unit'
0
-require 'action_controller/performance_test'
0
+require 'performance/test_helper'
0
 
0
 # Profiling results for each test method are written to tmp/performance.
0
 class BrowsingTest < ActionController::PerformanceTest
...
51
52
53
 
54
55
56
...
51
52
53
54
55
56
57
0
@@ -51,6 +51,7 @@ class AppGenerator < Rails::Generator::Base
0
       m.template "helpers/application.rb", "app/controllers/application.rb", :assigns => { :app_name => @app_name, :app_secret => md5.hexdigest }
0
       m.template "helpers/application_helper.rb", "app/helpers/application_helper.rb"
0
       m.template "helpers/test_helper.rb", "test/test_helper.rb"
0
+ m.template "helpers/performance_test_helper.rb", "test/performance/test_helper.rb"
0
       m.template "helpers/performance_test.rb", "test/performance/browsing_test.rb"
0
 
0
       # database.yml and routes.rb
...
103
104
105
106
 
107
108
109
...
111
112
113
114
 
115
116
117
...
103
104
105
 
106
107
108
109
...
111
112
113
 
114
115
116
117
0
@@ -103,7 +103,7 @@ namespace :test do
0
   end
0
   Rake::Task['test:integration'].comment = "Run the integration tests in test/integration"
0
 
0
- Rake::TestTask.new(:benchmark) do |t|
0
+ Rake::TestTask.new(:benchmark => 'db:test:prepare') do |t|
0
     t.libs << 'test'
0
     t.pattern = 'test/performance/**/*_test.rb'
0
     t.verbose = true
0
@@ -111,7 +111,7 @@ namespace :test do
0
   end
0
   Rake::Task['test:benchmark'].comment = 'Benchmark the performance tests'
0
 
0
- Rake::TestTask.new(:profile) do |t|
0
+ Rake::TestTask.new(:profile => 'db:test:prepare') do |t|
0
     t.libs << 'test'
0
     t.pattern = 'test/performance/**/*_test.rb'
0
     t.verbose = true

Comments

    No one has commented yet.