Sha256: 4e7337a8b558bc928bdabc23b880b92eb1ba8f5ac50ce813c1b7bfa245070187
Contents?: true
Size: 1.5 KB
Versions: 5
Compression:
Stored size: 1.5 KB
Contents
def dump_load_path puts $LOAD_PATH.join("\n") found = nil $LOAD_PATH.each do |path| if File.exists?(File.join(path,"rspec")) puts "Found rspec in #{path}" if File.exists?(File.join(path,"rspec","core")) puts "Found core" if File.exists?(File.join(path,"rspec","core","rake_task")) puts "Found rake_task" found = path else puts "!! no rake_task" end else puts "!!! no core" end end end if found.nil? puts "Didn't find rspec/core/rake_task anywhere" else puts "Found in #{path}" end end require 'bundler' require 'rake/clean' <% if rspec %> begin require 'rspec/core/rake_task' rescue LoadError dump_load_path raise end <% else %> require 'rake/testtask' <% end %> gem 'rdoc' # we need the installed RDoc gem, not the system one require 'rdoc/task' include Rake::DSL Bundler::GemHelper.install_tasks <% if rspec %> RSpec::Core::RakeTask.new do |t| # Put spec opts in a file named .rspec in root end <% else %> Rake::TestTask.new do |t| t.pattern = 'test/unit/test_*.rb' end Rake::TestTask.new("test:integration") do |t| t.pattern = 'test/integration/test_*.rb' end <% end %> Rake::RDocTask.new do |rd| <% if using_readme %> rd.main = "README.rdoc" rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*") <% else %> rd.rdoc_files.include("lib/**/*.rb","bin/**/*") <% end %> end <% if rspec %> task :default => [:spec] <% else %> task :default => [:test,"test:integration"] <% end %>
Version data entries
5 entries across 5 versions & 2 rubygems