Sha256: dd4cfdf76300b2bcd5694447e5963cea1fb25f4cc7815bb03ba30cb33801d1a4

Contents?: true

Size: 651 Bytes

Versions: 1

Compression:

Stored size: 651 Bytes

Contents

# frozen_string_literal: true

require 'bundler'

Bundler::GemHelper.install_tasks

begin
  require 'spree/testing_support/extension_rake'
  require 'rubocop/rake_task'
  require 'rspec/core/rake_task'

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

  RuboCop::RakeTask.new

  task default: %i(first_run rubocop spec)
rescue LoadError # rubocop:disable Lint/HandleExceptions
  # no rspec available
end

task :first_run do
  if Dir['spec/dummy'].empty?
    Rake::Task[:test_app].invoke
    Dir.chdir('../../')
  end
end

desc 'Generates a dummy app for testing'
task :test_app do
  ENV['LIB_NAME'] = '<%=file_name%>'
  Rake::Task['extension:test_app'].invoke
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_dev_support-0.3.0 lib/solidus_dev_support/templates/extension/Rakefile