Display a warning (not a LoadError) in the rakefile if rspec isn't around

This commit is contained in:
Scott Taylor 2009-12-02 02:23:58 -05:00
parent 80187db69f
commit 4445850d6d

View File

@ -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'