Rakefile in storazzo-0.4.2 vs Rakefile in storazzo-0.4.5
- old
+ new
@@ -1,19 +1,46 @@
#require 'rake'
# from hola: https://guides.rubygems.org/make-your-own-gem/#adding-an-executable
require "rake/testtask"
-Rake::TestTask.new do |t|
+desc "Run Unit tests"
+Rake::TestTask.new(:test) do |t|
t.libs << "test"
+ t.libs << "test/media"
+ # note this is only useful for this: https://chriskottom.com/articles/command-line-flags-for-minitest-in-the-raw/
t.verbose = false
t.warning = false
+ #puts "[RiccardoOnly]: t.pattern: #{t.pattern}"
+ t.pattern = 'test/**/test_*.rb'
end
-desc "Run tests"
+desc "By default, Run Unit tests"
task default: :test
+# Adding test/media directory to rake test.
+desc "Test tests/media/* code sobenem"
+namespace :test do
+ desc "Test Verbosely by default since I'm too stupid to toggle via ENV var dammit"
+ Rake::TestTask.new(:verbose) do |t|
+ t.libs << "test"
+ t.libs << "test/media"
+ t.verbose = true
+ t.warning = true
+ t.pattern = 'test/**/test_*.rb'
+ $DEBUG = true
+ end
+end
+# namespace :verbose_test do
+# desc "Test tests/media/* code"
+# Rake::TestTask.new do |t|
+# t.libs << "test/media"
+# # Rails::TestTask.new(media: 'test:prepare') do |t|
+# t.pattern = 'test/**/test_*.rb'
+# end
+# end
+#Rake::Task['test:run'].enhance ["test:media"]
# begin
# require 'bundler/setup'
# Bundler::GemHelper.install_tasks
# rescue LoadError
@@ -27,6 +54,9 @@
# require 'rubocop/rake_task'
# RuboCop::RakeTask.new do |task|
# task.requires << 'rubocop-performance'
# task.requires << 'rubocop-rspec'
-# end
\ No newline at end of file
+# end
+
+
+