Thorfile in berkshelf-1.1.6 vs Thorfile in berkshelf-1.2.0.rc1
- old
+ new
@@ -36,19 +36,19 @@
namespace :spec
default_task :all
desc "all", "Run all tests"
def all
- unless run_unit && run_acceptance
+ unless run_unit && run_acceptance && run_quality
exit 1
end
end
desc "ci", "Run all possible tests on Travis-CI"
def ci
ENV['CI'] = 'true' # Travis-CI also sets this, but set it here for local testing
- unless run_unit("--tag ~chef_server") && run_acceptance("--tags ~@chef_server")
+ unless run_unit("--tag ~chef_server") && run_acceptance("--tags ~@chef_server") && run_quality
exit 1
end
end
desc "unit", "Run unit tests"
@@ -63,26 +63,27 @@
unless run_acceptance
exit 1
end
end
+ desc "quality", "Run quality tests"
+ def quality
+ unless run_quality
+ exit 1
+ end
+ end
+
no_tasks do
def run_unit(*flags)
run "rspec --color --format=documentation #{flags.join(' ')} spec"
end
def run_acceptance(*flags)
run "cucumber --color --format pretty --tags ~@no_run #{flags.join(' ')}"
end
- end
- end
- class VCR < Thor
- namespace :vcr
- default_task :clean
-
- desc "clean", "clean VCR cassettes"
- def clean
- FileUtils.rm_rf("spec/fixtures/vcr_cassettes")
+ def run_quality
+ run "cane --gte coverage/.last_run.json,90"
+ end
end
end
end