Class: ChefTest::RakeTasks
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- ChefTest::RakeTasks
- Defined in:
- lib/cheftest/rake_tasks.rb
Instance Method Summary collapse
-
#initialize ⇒ RakeTasks
constructor
A new instance of RakeTasks.
Constructor Details
#initialize ⇒ RakeTasks
Returns a new instance of RakeTasks.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/cheftest/rake_tasks.rb', line 7 def initialize desc "Run all tests" task "ct" => %w(ct:foodcritic ct:knife ct:spec) desc "Run foodcritic" task "ct:foodcritic" do sh "bundle exec foodcritic -f any ." end desc "Run knife test" task "ct:knife" do # sh "bundle exec knife cookbook test #{cookbook_directory} -c #{knife_config_file} -o '..'" sh "bundle exec knife cookbook test #{cookbook_directory} -o '..'" end desc "Run specs" RSpec::Core::RakeTask.new("ct:spec") do |t| t.rspec_opts = %w(--color) end end |