Sha256: 6877ce016e3ac834157c592b0b643f140a44a609ea4445006da80bab947fa234

Contents?: true

Size: 789 Bytes

Versions: 2

Compression:

Stored size: 789 Bytes

Contents

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec)

def screen_test(file, method)
  raise ArgumentError, 'Missing argument: file' unless file
  require_relative 'tools/whirled_peas/tools/screen_tester'
  WhirledPeas::Tools::ScreenTester.new(file).send(method)
end

namespace :screen_test do
  %i[template view run save update debug].each do |t|
    task t, [:file] do |_, args|
      screen_test(args[:file], t)
    end
  end

  task :update_all do
    require_relative 'tools/whirled_peas/tools/screen_tester'
    WhirledPeas::Tools::ScreenTester.update_all
  end
end

task :screen_test do
  require_relative 'tools/whirled_peas/tools/screen_tester'
  WhirledPeas::Tools::ScreenTester.run_all
end

task default: :ci
task ci: %i[spec screen_test]

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
whirled_peas-0.7.1 Rakefile
whirled_peas-0.7.0 Rakefile