Class: TestMetaStatic
- Inherits:
-
Minitest::Test
- Object
- Minitest::Runnable
- Minitest::Test
- TestMetaStatic
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/minitest-5.17.0/test/minitest/test_minitest_spec.rb
Constant Summary
Constants inherited from Minitest::Test
Minitest::Test::PASSTHROUGH_EXCEPTIONS, Minitest::Test::SETUP_METHODS, Minitest::Test::TEARDOWN_METHODS
Constants included from Minitest::Assertions
Minitest::Assertions::E, Minitest::Assertions::UNDEFINED
Constants inherited from Minitest::Runnable
Instance Attribute Summary
Attributes inherited from Minitest::Runnable
Instance Method Summary collapse
- #assert_method_count(expected, klass) ⇒ Object
- #test_children ⇒ Object
- #test_it_wont_add_test_methods_to_children ⇒ Object
- #test_it_wont_remove_existing_child_test_methods ⇒ Object
Methods inherited from Minitest::Test
#capture_exceptions, #class_name, #clean, i_suck_and_my_tests_are_order_dependent!, make_my_diffs_pretty!, #neuter_exception, #new_exception, parallelize_me!, #run, runnable_methods, #sanitize_exception, test_order, #with_empty_backtrace_filter, #with_info_handler
Methods included from Minitest::Guard
#jruby?, #maglev?, #mri?, #osx?, #rubinius?, #windows?
Methods included from Minitest::Test::LifecycleHooks
#after_setup, #after_teardown, #before_setup, #before_teardown, #setup, #teardown
Methods included from Minitest::Reportable
#class_name, #error?, #location, #passed?, #result_code, #skipped?
Methods included from Minitest::Assertions
#_synchronize, #assert, #assert_empty, #assert_equal, #assert_in_delta, #assert_in_epsilon, #assert_includes, #assert_instance_of, #assert_kind_of, #assert_match, #assert_mock, #assert_nil, #assert_operator, #assert_output, #assert_path_exists, #assert_predicate, #assert_raises, #assert_respond_to, #assert_same, #assert_send, #assert_silent, #assert_throws, #capture_io, #capture_subprocess_io, #diff, diff, diff=, #exception_details, #fail_after, #flunk, #message, #mu_pp, #mu_pp_for_diff, #pass, #refute, #refute_empty, #refute_equal, #refute_in_delta, #refute_in_epsilon, #refute_includes, #refute_instance_of, #refute_kind_of, #refute_match, #refute_nil, #refute_operator, #refute_path_exists, #refute_predicate, #refute_respond_to, #refute_same, #skip, #skip_until, #skipped?, #things_to_diff
Methods inherited from Minitest::Runnable
#failure, inherited, #initialize, #marshal_dump, #marshal_load, methods_matching, #name, #name=, on_signal, #passed?, reset, #result_code, run, #run, run_one_method, runnable_methods, runnables, #skipped?, #time_it, #whatever, with_info_handler
Constructor Details
This class inherits a constructor from Minitest::Runnable
Instance Method Details
#assert_method_count(expected, klass) ⇒ Object
747 748 749 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/minitest-5.17.0/test/minitest/test_minitest_spec.rb', line 747 def assert_method_count expected, klass assert_equal expected, klass.public_instance_methods.grep(/^test_/).count end |
#test_children ⇒ Object
751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/minitest-5.17.0/test/minitest/test_minitest_spec.rb', line 751 def test_children Minitest::Spec.children.clear # prevents parallel run y = z = nil x = describe "top-level thingy" do y = describe "first thingy" do end it "top-level-it" do end z = describe "second thingy" do end end assert_equal [x], Minitest::Spec.children assert_equal [y, z], x.children assert_equal [], y.children assert_equal [], z.children end |
#test_it_wont_add_test_methods_to_children ⇒ Object
788 789 790 791 792 793 794 795 796 797 798 799 800 801 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/minitest-5.17.0/test/minitest/test_minitest_spec.rb', line 788 def test_it_wont_add_test_methods_to_children Minitest::Spec.children.clear # prevents parallel run inner = nil outer = describe "outer" do inner = describe "inner" do end it do assert true end end assert_method_count 1, outer assert_method_count 0, inner end |
#test_it_wont_remove_existing_child_test_methods ⇒ Object
769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/minitest-5.17.0/test/minitest/test_minitest_spec.rb', line 769 def test_it_wont_remove_existing_child_test_methods Minitest::Spec.children.clear # prevents parallel run inner = nil outer = describe "outer" do inner = describe "inner" do it do assert true end end it do assert true end end assert_method_count 1, outer assert_method_count 1, inner end |