File tree 2 files changed +4
-6
lines changed
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ def run
51
51
52
52
attr_reader :log
53
53
54
- def run_hooks
54
+ def run_hooks # rubocop:disable Metrics/MethodLength
55
55
if @hooks . any? ( &:enabled? )
56
56
@printer . start_run
57
57
@@ -78,7 +78,7 @@ def run_hooks
78
78
79
79
if hook_failed
80
80
message = @context . post_fail_message
81
- @printer . after ( message ) unless message . nil?
81
+ @printer . hook_run_failed ( message ) unless message . nil?
82
82
end
83
83
84
84
!hook_failed
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ def run_succeeded
75
75
end
76
76
end
77
77
78
- def after ( message )
78
+ def hook_run_failed ( message )
79
79
log . newline
80
80
log . log message
81
81
log . newline
@@ -131,9 +131,7 @@ def synchronize_all_methods
131
131
self . class . __send__ ( :alias_method , old_method , method_name )
132
132
133
133
self . class . send ( :define_method , new_method ) do |*args |
134
- @lock . synchronize do
135
- __send__ ( old_method , *args )
136
- end
134
+ @lock . synchronize { __send__ ( old_method , *args ) }
137
135
end
138
136
139
137
self . class . __send__ ( :alias_method , method_name , new_method )
You can’t perform that action at this time.
0 commit comments