Class: Lemon::TestModule
Overview
The nomenclature of a TestModule limts the focus of testing the methods of a module.
Direct Known Subclasses
Defined Under Namespace
Classes: Scope
Instance Attribute Summary
Attributes inherited from TestCase
#advice, #context, #label, #setup, #skip, #target, #tests
Instance Method Summary collapse
-
#initialize(settings = {}, &block) ⇒ TestModule
constructor
New unit test.
-
#to_s ⇒ Object
Gives the name of the target module.
-
#type ⇒ Object
The type of test case.
-
#validate_settings ⇒ Object
Make sure the target is a module.
Methods inherited from TestCase
#each, #evaluate, #run, #scope, #scope_class, #size, #skip!, #skip?
Constructor Details
#initialize(settings = {}, &block) ⇒ TestModule
New unit test.
12 13 14 15 |
# File 'lib/lemon/test_module.rb', line 12 def initialize(settings={}, &block) @tested = false super(settings) end |
Instance Method Details
#to_s ⇒ Object
Gives the name of the target module.
28 29 30 |
# File 'lib/lemon/test_module.rb', line 28 def to_s target.to_s end |
#type ⇒ Object
The type of test case.
23 24 25 |
# File 'lib/lemon/test_module.rb', line 23 def type 'Module' end |
#validate_settings ⇒ Object
Make sure the target is a module.
18 19 20 |
# File 'lib/lemon/test_module.rb', line 18 def validate_settings raise "#{@target} is not a module" unless Module === @target end |