From 98e2f0f35ccba2e85fa3afac484f7723ee576b3c Mon Sep 17 00:00:00 2001 From: Benjamin Young Date: Mon, 7 Nov 2011 10:13:22 -0500 Subject: [PATCH] moved rspec requirement into spec task to narrow dependencies You can now run `rake jquery` and friends without installing rspec. Closes #135. --- Rakefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Rakefile b/Rakefile index 94a6a77..a19c5ea 100644 --- a/Rakefile +++ b/Rakefile @@ -1,15 +1,15 @@ require 'rake' -require 'rspec/core/rake_task' task :default => :spec -RSpec::Core::RakeTask.new(:spec) do |t| - #t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""] - t.pattern = 'test/*_spec.rb' -end - desc "Run all specs" -task :spec +task :spec do + require 'rspec/core/rake_task' + RSpec::Core::RakeTask.new(:spec) do |t| + #t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""] + t.pattern = 'test/*_spec.rb' + end +end def templated_build(name, opts={}) # Create a rule that uses the .tmpl.{pre,post} stuff to make a final,