Display a warning (not a LoadError) in the rakefile if rspec isn't around
This commit is contained in:
parent
80187db69f
commit
4445850d6d
18
Rakefile
18
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"
|
desc "Run tests"
|
||||||
task :test do
|
task :test do
|
||||||
Dir['test/**/*_test.rb'].each { |file| require file }
|
Dir['test/**/*_test.rb'].each { |file| require file }
|
||||||
@ -12,6 +5,17 @@ end
|
|||||||
|
|
||||||
task :default => :test
|
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
|
begin
|
||||||
require 'jeweler'
|
require 'jeweler'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user