class Attestify::RakeTask

Rake task to run Attestify tests.

Attributes

name[R]

Public Class Methods

new(*args, &block) click to toggle source
# File lib/attestify/rake_task.rb, line 9
def initialize(*args, &block)
  @name = args.shift || :test
  define(args, &block)
end

Public Instance Methods

run_task() click to toggle source
# File lib/attestify/rake_task.rb, line 14
def run_task
  Attestify::CLI.new([]).start
end

Private Instance Methods

define(args) { |self, task_args| ... } click to toggle source
# File lib/attestify/rake_task.rb, line 20
def define(args)
  desc "Run Attestify tests" unless Rake.application.last_description

  task name, *args do |_, task_args|
    yield(self, task_args) if block_given?
    run_task
  end
end