diff --git a/README.md b/README.md index 0ded2cd..f86e7fd 100644 --- a/README.md +++ b/README.md @@ -290,8 +290,10 @@ Or just install it as a RubyGem: ## Plugins for jQuery, Dojo, Yui, CommonJS, qooxdoo This repository lets you build modules for [jQuery][], [Dojo][], [Yui][] and -[CommonJS][] / [Node.js][] with the help of `rake`. You may need to install -rspec first by running `gem install rspec`. +[CommonJS][] / [Node.js][] with the help of `rake`. + +NOTE: The default `rake` task is only used for testing and require rspec to be +installed (see below). Run `rake jquery` to get a jQuery compatible plugin file in the `mustache-jquery/` directory. @@ -309,6 +311,8 @@ Run `rake qooxdoo` to get a qooxdoo compatible file named `qooxdoo.mustache.js`. ## Testing +NOTE: You will need to install rspec first by running `gem install rspec`. + To run the mustache.js test suite, run `rake spec`. All specs will be run first with JavaScriptCore (using `jsc`) and again with Rhino, using `java org.mozilla.javascript.tools.shell.Main`. 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,