Skip to content

Commit bd1f331

Browse files
committed
add an on_response hook to the acceptance stack as an example
1 parent ba4076f commit bd1f331

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

spec/acceptance/plugins/lifecycle/request_method_logger.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,4 @@ class RequestMethodLogger < Hooks::Plugins::Lifecycle
55
def on_request(env)
66
log.debug("on_request called with method: #{env['REQUEST_METHOD']}")
77
end
8-
9-
def on_response(env, response)
10-
stats.success
11-
end
128
end
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
class ResponseSuccessHook < Hooks::Plugins::Lifecycle
4+
def on_response(env, response)
5+
stats.success
6+
end
7+
end

0 commit comments

Comments
 (0)