impressionist/Rakefile

35 lines
862 B
Ruby
Raw Normal View History

2012-03-12 01:38:05 +00:00
require 'bundler/setup'
require 'rspec/core/rake_task'
2013-07-11 03:00:06 +00:00
require 'rake/testtask'
2012-03-12 01:38:05 +00:00
Bundler::GemHelper.install_tasks
2011-02-04 04:13:41 +00:00
# Impressionist will use MiniTest instead of RSpec
2012-03-12 01:38:05 +00:00
RSpec::Core::RakeTask.new do |task|
task.rspec_opts = "-I ./tests/test_app/spec"
task.pattern = "./tests/test_app/spec/**/*_spec.rb"
2011-02-04 04:13:41 +00:00
end
2013-07-11 03:00:06 +00:00
task :test_app => :spec
task :default => [:test, :test_app]
2011-02-04 04:13:41 +00:00
namespace :impressionist do
require File.dirname(__FILE__) + "/lib/impressionist/bots"
2011-11-28 02:56:44 +00:00
2011-02-04 04:13:41 +00:00
desc "output the list of bots from http://www.user-agents.org/"
2011-11-28 02:56:44 +00:00
task :bots do
2011-02-04 04:13:41 +00:00
p Impressionist::Bots.consume
end
2013-07-11 03:00:06 +00:00
end
# setup :test task to minitest
# Rake libs default is lib
# libs << path to load test_helper, etc..
Rake::TestTask.new do |t|
t.libs << "tests/spec"
t.pattern = "tests/spec/**/*_spec.rb"
t.test_files = FileList["tests/spec/**/*_spec.rb"]
2013-07-11 03:00:06 +00:00
t.verbose = true
2012-03-06 22:20:22 +00:00
end