aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/commands/benchmarker.rb3
-rw-r--r--railties/lib/rails/test_unit/testing.rake7
2 files changed, 6 insertions, 4 deletions
diff --git a/railties/lib/rails/commands/benchmarker.rb b/railties/lib/rails/commands/benchmarker.rb
index b745b45e17..b9169468a3 100644
--- a/railties/lib/rails/commands/benchmarker.rb
+++ b/railties/lib/rails/commands/benchmarker.rb
@@ -2,9 +2,8 @@ require 'optparse'
require 'rails/test_help'
require 'rails/performance_test_help'
-ARGV.push('--benchmark') # HAX
+ENV["BENCHMARK_TESTS"] = '1'
require 'active_support/testing/performance'
-ARGV.pop
def options
options = {}
diff --git a/railties/lib/rails/test_unit/testing.rake b/railties/lib/rails/test_unit/testing.rake
index 290005993a..8d624c6999 100644
--- a/railties/lib/rails/test_unit/testing.rake
+++ b/railties/lib/rails/test_unit/testing.rake
@@ -123,10 +123,13 @@ namespace :test do
t.pattern = 'test/integration/**/*_test.rb'
end
- Rails::SubTestTask.new(:benchmark => 'test:prepare') do |t|
+ task 'test:benchmark_mode' do
+ ENV["BENCHMARK_TESTS"] = '1'
+ end
+
+ Rails::SubTestTask.new(:benchmark => ['test:prepare', 'test:benchmark_mode']) do |t|
t.libs << 'test'
t.pattern = 'test/performance/**/*_test.rb'
- t.options = '-- --benchmark'
end
Rails::SubTestTask.new(:profile => 'test:prepare') do |t|