Sha256: 29f6e3d4c9f9adffb9874f00fef44ab4682dfe6c21b0e0f8dc41a2b838e695ee

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

require "test/version"

# module for check and run tests
module Test
  class Error < StandardError; end

  def self.assert(expected:, actual:)
    expected == actual ? "Passed" : "Failed"
  end

  # run all methods -> tests_array:, instance -> tests:
  # method without parameters

  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
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
run_tests-0.1.3 lib/test.rb