Server IP : 172.67.216.182 / Your IP : 172.70.189.56 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/ruby/gems/3.0.0/gems/minitest-5.14.2/ |
Upload File : |
# -*- ruby -*- require "rubygems" require "hoe" Hoe.plugin :seattlerb Hoe.plugin :rdoc Hoe.spec "minitest" do developer "Ryan Davis", "[email protected]" license "MIT" require_ruby_version [">= 2.2", "< 3.1"] end desc "Find missing expectations" task :specs do $:.unshift "lib" require "minitest/test" require "minitest/spec" pos_prefix, neg_prefix = "must", "wont" skip_re = /^(must|wont)$|wont_(throw)|must_(block|not?_|nothing|send|raise$)/x dont_flip_re = /(must|wont)_(include|respond_to)/ map = { /(must_throw)s/ => '\1', /(?!not)_same/ => "_be_same_as", /_in_/ => "_be_within_", /_operator/ => "_be", /_includes/ => "_include", /(must|wont)_(.*_of|nil|silent|empty)/ => '\1_be_\2', /must_raises/ => "must_raise", /(must|wont)_predicate/ => '\1_be', /(must|wont)_path_exists/ => 'path_\1_exist', } expectations = Minitest::Expectations.public_instance_methods.map(&:to_s) assertions = Minitest::Assertions.public_instance_methods.map(&:to_s) assertions.sort.each do |assertion| expectation = case assertion when /^assert/ then assertion.sub(/^assert/, pos_prefix.to_s) when /^refute/ then assertion.sub(/^refute/, neg_prefix.to_s) end next unless expectation next if expectation =~ skip_re regexp, replacement = map.find { |re, _| expectation =~ re } expectation.sub! regexp, replacement if replacement next if expectations.include? expectation args = [assertion, expectation].map(&:to_sym).map(&:inspect) args << :reverse if expectation =~ dont_flip_re puts puts "##" puts "# :method: #{expectation}" puts "# See Minitest::Assertions##{assertion}" puts puts "infect_an_assertion #{args.join ", "}" end end task :bugs do sh "for f in bug*.rb ; do echo $f; echo; #{Gem.ruby} -Ilib $f && rm $f ; done" end # vim: syntax=Ruby