diff --git a/Rakefile b/Rakefile index 57b872b..e664de4 100644 --- a/Rakefile +++ b/Rakefile @@ -1,10 +1,3 @@ -require 'spec/rake/spectask' - -desc "Run specs" -Spec::Rake::SpecTask.new(:spec) do |t| - t.spec_files = FileList["spec/**/*.rb"] -end - desc "Run tests" task :test do Dir['test/**/*_test.rb'].each { |file| require file } @@ -12,6 +5,17 @@ end task :default => :test +begin + require 'spec/rake/spectask' + + desc "Run specs" + Spec::Rake::SpecTask.new(:spec) do |t| + t.spec_files = FileList["spec/**/*.rb"] + end +rescue LoadError + puts "Spec task can't be loaded. `gem install rspec`" +end + begin require 'jeweler'