mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Fix warnings
JRuby-specific: fix 'warning: (...) interpreted as grouped expression'
This commit is contained in:
@@ -15,10 +15,17 @@ Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
|
||||
|
||||
|
||||
require 'capture_warnings'
|
||||
@capture_warnings = CaptureWarnings.new(fail_build = false)
|
||||
@capture_warnings = CaptureWarnings.new(fail_build = true)
|
||||
@capture_warnings.before_tests
|
||||
Minitest.after_run do
|
||||
@capture_warnings.after_tests
|
||||
if Minitest.respond_to?(:after_run)
|
||||
Minitest.after_run do
|
||||
@capture_warnings.after_tests
|
||||
end
|
||||
else
|
||||
at_exit do
|
||||
STDOUT.puts "Minitest.after_run not available."
|
||||
@capture_warnings.after_tests
|
||||
end
|
||||
end
|
||||
|
||||
require 'active_model_serializers'
|
||||
|
||||
Reference in New Issue
Block a user