added rake tasks, setup minitest
This commit is contained in:
parent
9c169afa8d
commit
512c949e3c
15
Rakefile
15
Rakefile
|
@ -1,5 +1,6 @@
|
|||
require 'bundler/setup'
|
||||
require 'rspec/core/rake_task'
|
||||
require 'rake/testtask'
|
||||
|
||||
Bundler::GemHelper.install_tasks
|
||||
|
||||
|
@ -9,8 +10,8 @@ RSpec::Core::RakeTask.new do |task|
|
|||
task.pattern = "./tests/test_app/spec/**/*_spec.rb"
|
||||
end
|
||||
|
||||
task :test => :spec
|
||||
task :default => :spec
|
||||
task :test_app => :spec
|
||||
task :default => [:test, :test_app]
|
||||
|
||||
namespace :impressionist do
|
||||
require File.dirname(__FILE__) + "/lib/impressionist/bots"
|
||||
|
@ -19,4 +20,14 @@ namespace :impressionist do
|
|||
task :bots do
|
||||
p Impressionist::Bots.consume
|
||||
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
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# Responsability
|
||||
# Test whether rails version > 4
|
||||
# includes attr_accessible if < 4
|
||||
require "test_helper.rb"
|
|
@ -0,0 +1,3 @@
|
|||
$:.unshift(File.dirname __FILE__)
|
||||
|
||||
require "minitest/autorun"
|
Loading…
Reference in New Issue