Server IP : 172.67.216.182 / Your IP : 172.68.164.36 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 : |
# Specs: # Equivalent Unit Tests: ############################################################################### describe Thingy do # class TestThingy < Minitest::Test before do # def setup do_some_setup # super end # do_some_setup # end it "should do the first thing" do # 1.must_equal 1 # def test_first_thing end # assert_equal 1, 1 # end describe SubThingy do # end before do # do_more_setup # class TestSubThingy < TestThingy end # def setup # super it "should do the second thing" do # do_more_setup 2.must_equal 2 # end end # end # def test_second_thing end # assert_equal 2, 2 # end # end ############################################################################### # runs 2 specs # runs 3 tests ############################################################################### # The specs generate: class ThingySpec < Minitest::Spec def setup super do_some_setup end def test_should_do_the_first_thing assert_equal 1, 1 end end class SubThingySpec < ThingySpec def setup super do_more_setup end # because only setup/teardown is inherited, not specs remove_method :test_should_do_the_first_thing def test_should_do_the_second_thing assert_equal 2, 2 end end