Skip to content
Browse files

Work around change in how MiniTest detects SIGINFO

MiniTest 4.7.3 detects the presence of SIGINFO and stores the answer in
a constant.

It seems that MiniTest 4.7.4 changes this, and instead relies on an
info_signal method being implemented on the runner object.

In ActiveSupport::Testing::Isolation, we use ProxyTestResult to stand in
for the runner object. This object implements `method_missing`, and as
such its #info_signal method has a truthy return value. This results in
MiniTest trying to install the SIGINFO handler on platforms where
SIGINFO does not exists.

To fix, I am simply defining an explicit ProxyTestResult#info_signal
method.
  • Loading branch information...
1 parent 3652e4e commit 1a9109879aa4ba840b17d0dac780ad66dbb15968 @jonleighton jonleighton committed May 3, 2013
Showing with 4 additions and 0 deletions.
  1. +4 −0 activesupport/lib/active_support/testing/isolation.rb
View
4 activesupport/lib/active_support/testing/isolation.rb
@@ -40,6 +40,10 @@ def marshal_load(calls)
def method_missing(name, *args)
@calls << [name, args]
end
+
+ def info_signal
+ Signal.list['INFO']
+ end
end
module Isolation

2 comments on commit 1a91098

@schneems
Ruby on Rails member

You seem to be familiar with this problem, we're seeing it in rails/sprockets-rails#105 do you know if there is any work pushing a fix upstream to minitest or if this problem still exists on master?

@arthurnn
Ruby on Rails member

rails/sprockets-rails#106 is attempting to fix it too.

Please sign in to comment.
Something went wrong with that request. Please try again.