Module: Lemon::DSL
- Defined in:
- lib/lemon.rb
Overview
Lemon’s toplevel test domain specific language.
Instance Method Summary collapse
-
#covers(script) ⇒ Object
(also: #Covers)
Require script and record it.
-
#test_case(target) { ... } ⇒ Object
(also: #TestCase, #testcase)
Define a class/module test case.
Instance Method Details
#covers(script) ⇒ Object Also known as: Covers
Require script and record it.
34 35 36 37 |
# File 'lib/lemon.rb', line 34 def covers(script) # TODO: record coverage list require script end |
#test_case(target) { ... } ⇒ Object Also known as: TestCase, testcase
Define a class/module test case.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/lemon.rb', line 48 def test_case(target, &block) case target when Class $TEST_SUITE << Lemon::TestClass.new(:target=>target, &block) when Module $TEST_SUITE << Lemon::TestModule.new(:target=>target, &block) else if defined?(super) super(target, &block) else raise end end end |