gir_ffi-0.15.2/0000755000004100000410000000000013574414473013250 5ustar www-datawww-datagir_ffi-0.15.2/test/0000755000004100000410000000000013574414473014227 5ustar www-datawww-datagir_ffi-0.15.2/test/base_test_helper.rb0000644000004100000410000000351413574414473020067 0ustar www-datawww-data# frozen_string_literal: true old_verbose = $VERBOSE $VERBOSE = false begin require "test-prof" TestProf::RubyProf.configure do |config| config.min_percent = 0.5 end rescue LoadError warn "test-prof not available" end $VERBOSE = old_verbose if ENV["CI"] begin require "coveralls" Coveralls.wear! rescue LoadError nil end end require "minitest/autorun" require "rspec/mocks/minitest_integration" Thread.abort_on_exception = true module BaseTestExtensions def assert_defines_singleton_method(klass, method, msg = nil) method = method.to_sym methods = klass.singleton_methods(false).map(&:to_sym) msg = message(msg) do "Expected #{mu_pp(klass)} to define singleton method #{mu_pp(method)}, " \ "but only found #{mu_pp(methods)}" end assert_includes methods, method, msg end def refute_defines_singleton_method(klass, method, msg = nil) method = method.to_sym methods = klass.singleton_methods(false).map(&:to_sym) msg = message(msg) do "Expected #{mu_pp(klass)} not to define singleton method #{mu_pp(method)}" end refute_includes methods, method, msg end def assert_defines_instance_method(klass, method, msg = nil) method = method.to_sym methods = klass.instance_methods(false).map(&:to_sym) msg = message(msg) do "Expected #{mu_pp(klass)} to define instance method #{mu_pp(method)}, " \ "but only found #{mu_pp(methods)}" end assert_includes methods, method, msg end def refute_defines_instance_method(klass, method, msg = nil) method = method.to_sym methods = klass.instance_methods(false).map(&:to_sym) msg = message(msg) do "Expected #{mu_pp(klass)} not to define instance method #{mu_pp(method)}" end refute_includes methods, method, msg end end Minitest::Test.include BaseTestExtensions gir_ffi-0.15.2/test/minitest/0000755000004100000410000000000013574414473016063 5ustar www-datawww-datagir_ffi-0.15.2/test/minitest/stats_plugin.rb0000644000004100000410000000114513574414473021125 0ustar www-datawww-data# frozen_string_literal: true module Minitest class StatsReporter < AbstractReporter def initialize(_options) @results = [] end def start @current_time = Time.now end def record(result) @results << result end def report slowest = @results.sort_by(&:time).reverse.first(10) slowest.each do |result| puts format("%