Sha256: 060a93622398a5238aa7de00a8cf2bdddfc8b5409d440055ef74054ba505d369

Contents?: true

Size: 791 Bytes

Versions: 11

Compression:

Stored size: 791 Bytes

Contents

require_relative '../application'
require_relative 'case_manager'

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

def define_check(name, *args, &block)
  Application.instance.checks[name] = { args: args, block: block }
end
alias definecheck define_check
alias def_check define_check
alias defcheck define_check
alias dcheck define_check

def group(name, &block)
  Application.instance.groups << { name: name, block: block }
end
alias task group

def play(&block)
  CaseManager.instance.play(&block)
end
alias start play

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
teuton-2.1.8 lib/teuton/case_manager/dsl.rb
teuton-2.1.8dev1 lib/teuton/case_manager/dsl.rb
teuton-2.1.7 lib/teuton/case_manager/dsl.rb
teuton-2.1.6 lib/teuton/case_manager/dsl.rb
teuton-2.1.5dev lib/teuton/case_manager/dsl.rb
teuton-2.1.4 lib/teuton/case_manager/dsl.rb
teuton-2.1.3 lib/teuton/case_manager/dsl.rb
teuton-2.1.2 lib/teuton/case_manager/dsl.rb
teuton-2.1.1 lib/teuton/case_manager/dsl.rb
teuton-2.1.0 lib/teuton/case_manager/dsl.rb
teuton-0.0.1 lib/teuton/case_manager/dsl.rb