class Loupe::RakeTask

Loupe's test rake task

Define a rake task so that we can hook into `rake test` an run the suite using Loupe. To hook it up, add this to the Rakefile

require “loupe/rake_task”

Loupe::RakeTask.new do |options|

options << "--plain"
options << "--ractor"

end

Then run with `bundle exec rake test`

Attributes

description[RW]
libs[RW]
name[RW]

Public Class Methods

new() { |options| ... } click to toggle source

@return [Loupe::RakeTask]

Calls superclass method
# File lib/loupe/rake_task.rb, line 26
def initialize
  super

  @name = "test"
  @description = "Run tests using Loupe"
  @libs = %w[lib test]
  @options = []
  ARGV.shift if ARGV.first == "test"
  yield(@options)
  define
end

Private Instance Methods

define() click to toggle source

@return [Loupe::RakeTask]

# File lib/loupe/rake_task.rb, line 41
def define
  desc @description
  task(@name) { Loupe::Cli.new(@options) }
  self
end