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: DSL
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
#domain, #domain_class, #each, #evaluate, #run, #scope, #size, #skip!, #skip?, #tags
Constructor Details
#initialize(settings = {}, &block) ⇒ TestModule
New unit test.
15 16 17 18 |
# File 'lib/lemon/test_module.rb', line 15 def initialize(settings={}, &block) @tested = false super(settings) end |
Instance Method Details
#to_s ⇒ Object
Gives the name of the target module.
37 38 39 |
# File 'lib/lemon/test_module.rb', line 37 def to_s target.to_s end |
#type ⇒ Object
The type of test case.
30 31 32 |
# File 'lib/lemon/test_module.rb', line 30 def type 'Module' end |
#validate_settings ⇒ Object
Make sure the target is a module.
23 24 25 |
# File 'lib/lemon/test_module.rb', line 23 def validate_settings raise "#{@target} is not a module" unless Module === @target end |