added rake tasks, setup minitest

This commit is contained in:
Antonio C Nalesso Moreira 2013-07-11 04:00:06 +01:00
parent 9c169afa8d
commit 512c949e3c
3 changed files with 20 additions and 2 deletions

View File

@ -1,5 +1,6 @@
require 'bundler/setup' require 'bundler/setup'
require 'rspec/core/rake_task' require 'rspec/core/rake_task'
require 'rake/testtask'
Bundler::GemHelper.install_tasks Bundler::GemHelper.install_tasks
@ -9,8 +10,8 @@ RSpec::Core::RakeTask.new do |task|
task.pattern = "./tests/test_app/spec/**/*_spec.rb" task.pattern = "./tests/test_app/spec/**/*_spec.rb"
end end
task :test => :spec task :test_app => :spec
task :default => :spec task :default => [:test, :test_app]
namespace :impressionist do namespace :impressionist do
require File.dirname(__FILE__) + "/lib/impressionist/bots" require File.dirname(__FILE__) + "/lib/impressionist/bots"
@ -19,4 +20,14 @@ namespace :impressionist do
task :bots do task :bots do
p Impressionist::Bots.consume p Impressionist::Bots.consume
end end
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 = FileList['tests/spec/*_spec.rb']
t.verbose = true
end end

View File

@ -0,0 +1,4 @@
# Responsability
# Test whether rails version > 4
# includes attr_accessible if < 4
require "test_helper.rb"

View File

@ -0,0 +1,3 @@
$:.unshift(File.dirname __FILE__)
require "minitest/autorun"