Skip to content

Commit 3e2727d

Browse files
committed
Add test file for StackProf
1 parent f84cdb4 commit 3e2727d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
require 'test_helper'
2+
3+
class DocumentsControllerTest < ActionController::TestCase
4+
test "index" do
5+
get :index
6+
assert_equal 200, response.status
7+
end
8+
end
9+
10+
class DocumentsIntegrationTest < ActionDispatch::IntegrationTest
11+
test "index" do
12+
get '/documents'
13+
assert_equal 200, response.status
14+
end
15+
end
16+
17+
Minitest.run_one_method(DocumentsIntegrationTest, 'test_index')
18+
Minitest.run_one_method(DocumentsControllerTest, 'test_index')
19+
StackProf.run(mode: :cpu, out: 'stackprof.dump') do
20+
3000.times do
21+
Minitest.run_one_method(DocumentsControllerTest, 'test_index')
22+
end
23+
end

0 commit comments

Comments
 (0)