class Object
Public Instance Methods
define_macro(name, *args, &block)
click to toggle source
Define macro. That's a name to predefined target-run-expect evaluation. @param name (String) macro name @param block (Block) macro code
# 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)
click to toggle source
Define a group of tests @param name (String) Group name @param block (Block) Tests code
# File lib/teuton/case_manager/dsl.rb, line 29 def group(name, &block) Application.instance.groups << { name: name, block: block } end
Also aliased as: task, task, task
play(&block)
click to toggle source
Start test @param block (Block) Extra code executed at the end.
# File lib/teuton/case_manager/dsl.rb, line 36 def play(&block) CaseManager.instance.play(&block) end
Also aliased as: start
use(filename)
click to toggle source
Define filename to be used into our test @param filename (String) Filename to be required
# 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) findfiles = [] files.sort.each { |f| findfiles << f if f.include?(filename) } require_relative findfiles.first app.uses << File.basename(findfiles.first) end