Top Level Namespace
Defined Under Namespace
Modules: ConfigFileReader, DSL, ExportManager, FormatterFactory, Lang, NameFileFinder, Skeleton, Teuton, Utils, Verbose Classes: Application, ArrayFormatter, BaseFormatter, Builtin, CLI, CSVFormatter, Case, CaseManager, HTMLFormatter, JSONFormatter, Laboratory, ListFormatter, MoodleCSVFormatter, Package, Readme, Report, Result, ResumeArrayFormatter, ResumeHTMLFormatter, ResumeJSONFormatter, ResumeListFormatter, ResumeTXTFormatter, ResumeYAMLFormatter, Service, TXTFormatter, TeutonFile, TeutonHost, User, XMLFormatter, YAMLFormatter
Instance Method Summary collapse
-
#define_macro(name, *args, &block) ⇒ Object
(also: #def_macro, #defmacro)
Define macro.
-
#group(name, &block) ⇒ Object
(also: #task)
DSL group: Define a group of test.
-
#use(filename) ⇒ Object
DSL use: import filename instructions.
Instance Method Details
#define_macro(name, *args, &block) ⇒ Object Also known as: def_macro, defmacro
Define macro. That's a name to predefined target-run-expect evaluation.
20 21 22 |
# File 'lib/teuton/case_manager/dsl.rb', line 20 def define_macro(name, *args, &block) Application.instance.macros[name] = {args: args, block: block} end |
#group(name, &block) ⇒ Object Also known as: task
DSL group: Define a group of test
29 30 31 |
# File 'lib/teuton/case_manager/dsl.rb', line 29 def group(name, &block) Application.instance.groups << {name: name, block: block} end |
#use(filename) ⇒ Object
DSL use: import filename instructions
6 7 8 9 10 11 12 13 14 |
# File 'lib/teuton/case_manager/dsl.rb', line 6 def use(filename) filename += ".rb" app = Application.instance rbfiles = File.join(app.project_path, "**", filename) files = Dir.glob(rbfiles) use = [] files.sort.each { |f| use << f if f.include?(filename) } require_relative use[0] end |