Browse files

make rake tasks a little cleaner wrt dependencies

  • Loading branch information...
1 parent d5817ad commit 9d37a55d873a9deeb94e762a87b6e1b1aea874cb Dan Pickett committed Oct 23, 2011
Showing with 14 additions and 10 deletions.
  1. +14 −10 Rakefile
View
24 Rakefile
@@ -25,19 +25,23 @@ rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
-require 'spec/rake/spectask'
-Spec::Rake::SpecTask.new(:spec) do |spec|
- spec.libs << 'lib' << 'spec'
- spec.spec_files = FileList['spec/**/*_spec.rb']
-end
+begin
+ require 'spec/rake/spectask'
+ Spec::Rake::SpecTask.new(:spec) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.spec_files = FileList['spec/**/*_spec.rb']
+ end
-Spec::Rake::SpecTask.new(:rcov) do |spec|
- spec.libs << 'lib' << 'spec'
- spec.pattern = 'spec/**/*_spec.rb'
- spec.rcov = true
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
+ end
+rescue LoadError
+ puts "Rspec (or a dependency) not available. gem install rspec"
end
-task :spec => :check_dependencies
+ task :spec => :check_dependencies
begin
require 'cucumber/rake/task'

0 comments on commit 9d37a55

Please sign in to comment.