webrat/Rakefile

86 lines
2.5 KiB
Ruby
Raw Normal View History

2008-03-03 00:35:46 +00:00
require 'rubygems'
require 'hoe'
require 'spec'
require 'spec/rake/spectask'
2008-03-03 00:35:46 +00:00
require './lib/webrat.rb'
2008-03-02 20:14:52 +00:00
2008-03-03 00:35:46 +00:00
Hoe.new('webrat', Webrat::VERSION) do |p|
p.rubyforge_name = 'webrat'
p.summary = 'Ruby Acceptance Testing for Web applications'
2008-03-03 00:55:50 +00:00
p.developer "Bryan Helmkamp", "bryan@brynary.com"
p.developer "Seth Fitzsimmons", "seth@mojodna.net"
p.description = p.paragraphs_of('README.txt', 4..6).join("\n\n")
p.url = p.paragraphs_of('README.txt', 1).first.split("\n").first.strip
2008-04-04 14:38:55 +00:00
p.changes = p.paragraphs_of('History.txt', 0..3).join("\n\n")
2008-04-04 14:24:11 +00:00
p.extra_deps << ["hpricot", ">= 0.6"]
2008-03-03 00:35:46 +00:00
2008-03-03 00:55:50 +00:00
p.remote_rdoc_dir = '' # Release to root
2008-03-02 20:14:52 +00:00
end
desc "Upload rdoc to brynary.com"
2008-03-03 00:35:46 +00:00
task :publish_rdoc => :docs do
sh "scp -r doc/ brynary.com:/apps/uploads/webrat"
end
Rake::TaskManager.class_eval do
def remove_task(task_name)
@tasks.delete(task_name.to_s)
end
end
def remove_task(task_name)
Rake.application.remove_task(task_name)
end
remove_task "test"
remove_task "test_deps"
2008-10-25 16:42:38 +00:00
desc "Run API and Core specs"
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
2008-10-25 16:42:38 +00:00
t.spec_files = FileList['spec/api/*_spec.rb'] + FileList['spec/webrat/core/*_spec.rb']
end
2008-10-25 16:42:38 +00:00
namespace :spec do
desc "Run Rails specs"
Spec::Rake::SpecTask.new(:rails) do |t|
t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
t.spec_files = FileList['spec/webrat/rails/*_spec.rb']
end
desc "Run Merb specs"
Spec::Rake::SpecTask.new(:merb) do |t|
t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
t.spec_files = FileList['spec/webrat/merb/*_spec.rb']
end
desc "Run Mechanize specs"
Spec::Rake::SpecTask.new(:mechanize) do |t|
t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
t.spec_files = FileList['spec/webrat/mechanize/*_spec.rb']
end
end
2008-10-25 16:42:38 +00:00
# desc "Run all specs in spec directory with RCov"
# Spec::Rake::SpecTask.new(:rcov) do |t|
# t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
# t.spec_files = set_file_list
# t.rcov = true
# t.rcov_opts = lambda do
# IO.readlines(File.dirname(__FILE__) + "/spec/rcov.opts").map {|l| l.chomp.split " "}.flatten
# end
# end
#
# require 'spec/rake/verify_rcov'
# RCov::VerifyTask.new(:verify_rcov => :rcov) do |t|
# t.threshold = 96.2 # Make sure you have rcov 0.7 or higher!
# end
#
# remove_task "default"
# task :default do
# Rake::Task["verify_rcov"].invoke
# end