Skip to content

Commit ea05b1a

Browse files
committed
let it run multiple times [ci skip]
1 parent c6f2da5 commit ea05b1a

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

memory_test.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
class Constantized < Webmachine::Resource
55
HELLO_WORLD = "Hello World".freeze
6-
ALLOWED_METHODS = [Webmachine::GET_METHOD].freeze
7-
CONTENT_TYPES_PROVIDED = [[Webmachine::TEXT_HTML, :to_html]].freeze
6+
ALLOWED_METHODS = ['GET'.freeze].freeze
7+
CONTENT_TYPES_PROVIDED = [['text/html'.freeze, :to_html].freeze].freeze
88

99
def allowed_methods
1010
ALLOWED_METHODS
@@ -25,10 +25,12 @@ def to_html
2525

2626
require 'webmachine/test'
2727
session = Webmachine::Test::Session.new(Webmachine.application)
28-
28+
CONSTANTIZED = '/constantized'.freeze
2929
require 'memory_profiler'
3030
report = MemoryProfiler.report do
31-
session.get('/constantized')
31+
5.times do
32+
session.get(CONSTANTIZED)
33+
end
3234
end
3335

3436
report.pretty_print

0 commit comments

Comments
 (0)