diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-05 03:08:32 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-05 03:08:32 -0700 |
commit | 008b178a90cf6a9eb70015373cc39b8c6f40ed35 (patch) | |
tree | 23c19aaba9e24a83685e2a9b378c27ace9f01802 /railties/test/application | |
parent | ffe731c922e2290b6796a74cfe82f80ce9be009e (diff) | |
parent | ebc5ef0e6662cb3aa0b5098e23b39eb56364b235 (diff) | |
download | rails-008b178a90cf6a9eb70015373cc39b8c6f40ed35.tar.gz rails-008b178a90cf6a9eb70015373cc39b8c6f40ed35.tar.bz2 rails-008b178a90cf6a9eb70015373cc39b8c6f40ed35.zip |
Merge pull request #392 from janx/master
Patch for performance test: make it run with ruby19/minitest
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/test_test.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/railties/test/application/test_test.rb b/railties/test/application/test_test.rb index 1fbbb40132..f96319f472 100644 --- a/railties/test/application/test_test.rb +++ b/railties/test/application/test_test.rb @@ -65,6 +65,31 @@ module ApplicationTests run_test 'integration/posts_test.rb' end + test "performance test" do + controller 'posts', <<-RUBY + class PostsController < ActionController::Base + end + RUBY + + app_file 'app/views/posts/index.html.erb', <<-HTML + Posts#index + HTML + + app_file 'test/performance/posts_test.rb', <<-RUBY + require 'test_helper' + require 'rails/performance_test_help' + + class PostsTest < ActionDispatch::PerformanceTest + def test_index + get '/posts' + assert_response :success + end + end + RUBY + + run_test 'performance/posts_test.rb' + end + private def run_test(name) result = ruby '-Itest', "#{app_path}/test/#{name}" |