summaryrefslogtreecommitdiff
path: root/chef-config/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'chef-config/Rakefile')
-rw-r--r--chef-config/Rakefile12
1 files changed, 8 insertions, 4 deletions
diff --git a/chef-config/Rakefile b/chef-config/Rakefile
index 151c2754c3..46f87c96c9 100644
--- a/chef-config/Rakefile
+++ b/chef-config/Rakefile
@@ -1,4 +1,3 @@
-require "rspec/core/rake_task"
require "chef-config/package_task"
ChefConfig::PackageTask.new(File.expand_path("..", __FILE__), "ChefConfig") do |package|
@@ -7,7 +6,12 @@ end
task :default => :spec
-desc "Run standard specs"
-RSpec::Core::RakeTask.new(:spec) do |t|
- t.pattern = FileList["spec/**/*_spec.rb"]
+begin
+ require "rspec/core/rake_task"
+ desc "Run standard specs"
+ RSpec::Core::RakeTask.new(:spec) do |t|
+ t.pattern = FileList["spec/**/*_spec.rb"]
+ end
+rescue LoadError
+ STDERR.puts "\n*** RSpec not available. (sudo) gem install rspec to run unit tests. ***\n\n"
end