Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
# In rails 1.2, plugins aren't available in the path until they're loaded. # Check to see if the rspec plugin is installed first and require # it if it is. If not, use the gem version. rspec_base = File.expand_path(File.dirname(__FILE__) + '/../../vendor/plugins/rspec/lib') $LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base) require 'spec/rake/spectask' require 'spec/translator' namespace :spec do desc "Print HTML documentation of spec" Spec::Rake::SpecTask.new(:html_doc) do |t| t.spec_opts = ["--format", "html:spec/report.html", "--dry-run"] t.spec_files = FileList['spec/**/*_spec.rb'] end end
This paste will be private.
From the Design Piracy series on my blog: