Sha256: 3f7e27f7dd87ea3b53a692d8a2d23ce541f6fc2140874cc6a4d55742b69cf382
Contents?: true
Size: 1.31 KB
Versions: 14
Compression:
Stored size: 1.31 KB
Contents
# frozen_string_literal: true require 'rake/testtask' rspec_loaded = true begin require 'rspec/core/rake_task' rescue LoadError rspec_loaded = false end namespace :eac_rails_base0 do desc 'Remove all temporary files.' task clear: ['db:schema:cache:clear', 'log:clear', 'tmp:clear', 'assets:clobber'] do end if rspec_loaded ::RSpec::Core::RakeTask.new(:rspec) do |t| t.rspec_opts = "--pattern '{spec,#{::EacRailsBase0::Paths.engines_subpath}/*/spec}/**/*_spec.rb'" end Rake::Task['eac_rails_base0:rspec'].enhance ['db:test:prepare'] end namespace :minitest do { core: '', engines: "#{::EacRailsBase0::Paths.engines_subpath}/*/" } .each do |name, pattern_prefix| ::Rake::TestTask.new(name => 'test:prepare') do |t| t.libs << 'test' t.pattern = "#{pattern_prefix}test/**/*_test.rb" t.ruby_opts = %w[-W0] t.verbose = false end end end desc 'Minitest for application and engines' task minitest: %w[core engines].map { |task| "eac_rails_base0:minitest:#{task}" } desc 'Minitest and RSpec for application' task test: ['eac_rails_base0:minitest'] + (rspec_loaded ? ['eac_rails_base0:rspec'] : []) end Rake::Task['default'].clear task default: %w[eac_rails_base0:test] Rake::Task['test'].clear task test: %w[eac_rails_base0:minitest]
Version data entries
14 entries across 14 versions & 1 rubygems