class Lemon::TestModule::DSL
Evaluation scope for TestModule
.
Public Instance Methods
class_method(method, *tags, &block)
More specific nomencalture for `#class_unit`.
Alias for: class_unit
class_unit(method, *tags, &block)
click to toggle source
Define a class-method unit test for this case.
# File lib/lemon/test_module.rb, line 88 def class_unit(method, *tags, &block) return if @_omit meth = TestClassMethod.new( :context => @_testcase, :setup => @_setup, :skip => @_skip, :target => method.to_sym, :tags => tags, :singleton => true, &block ) @_testcase.tests << meth meth end
context_class()
click to toggle source
The class for which this is a DSL
context.
# File lib/lemon/test_module.rb, line 48 def context_class TestModule end
unit(method, *tags, &block)
click to toggle source
Define a method-unit subcase for the class/module testcase.
@example
unit :puts do test "print message with new line to stdout" do puts "Hello" end end
# File lib/lemon/test_module.rb, line 62 def unit(method, *tags, &block) return if @_omit meth = TestMethod.new( :context => @_testcase, :setup => @_setup, :skip => @_skip, :target => method.to_sym, :tags => tags, :singleton => false, &block ) @_testcase.tests << meth meth end