Permalink
Browse files

Preserve integration session's request_count

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8701 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
jeremy committed Jan 23, 2008
1 parent 8273280 commit 2cd8424aaeb4b4757d532783be8ef0da1e778f88
Showing with 10 additions and 1 deletion.
  1. +10 −1 actionpack/lib/action_controller/request_profiler.rb
@@ -41,7 +41,16 @@ def say(message)
private
def define_run_method(script_path)
script = File.read(script_path)
- source = "def run\n#{script}\nreset!\nend"
+
+ source = <<-end_source
+ def run
+ #{script}
+ old_request_count = request_count
+ reset!
+ self.request_count = old_request_count
+ end
+ end_source
+
instance_eval source, script_path, 1
end

0 comments on commit 2cd8424

Please sign in to comment.