Class: Liza::UnitTest

Inherits:
Test show all
Defined in:
lib/liza/unit_test.rb

Defined Under Namespace

Classes: TestMethodsDefinedHelper

Class Method Summary collapse

Methods inherited from Test

color, subsystem

Methods inherited from Unit

const_missing, division, part, system, #system, test_class

Class Method Details

.test_methods_defined(&block) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/liza/unit_test.rb', line 8

def self.test_methods_defined(&block)
  helper = TestMethodsDefinedHelper.new
  helper.instance_eval(&block)

  test :subject_class, :methods_defined do
    a = subject_class.methods_defined
    b = helper.methods
    assert_equality a, b, kaller: helper.methods_caller
  end

  test :subject_class, :instance_methods_defined do
    a = subject_class.instance_methods_defined
    b = helper.instance_methods
    assert_equality a, b, kaller: helper.instance_methods_caller
  end
end