module Test
module for check and run tests
Constants
- VERSION
Public Class Methods
assert(expected:, actual:)
click to toggle source
# File lib/test.rb, line 7 def self.assert(expected:, actual:) expected == actual ? "Passed" : "Failed" end
run_tests(test_class:, tests:)
click to toggle source
run all methods -> tests_array:, instance -> tests: method without parameters
# File lib/test.rb, line 14 def self.run_tests(test_class:, tests:) tests_array = test_class.methods(false) tests_array.each do |test_method| puts tests.public_send(test_method) end end