Create test infrastructure
This commit is contained in:
parent
b9ecfcf3af
commit
d592e315d8
|
@ -0,0 +1,36 @@
|
|||
# encoding: utf-8
|
||||
|
||||
require 'rake'
|
||||
|
||||
FileList['tasks/**/*.rake'].each { |task| import task }
|
||||
desc 'run all specs'
|
||||
|
||||
task :spec => ['spec:unit', 'spec:integration']
|
||||
desc 'run all integration tests'
|
||||
|
||||
task :integration => ['spec:integration']
|
||||
|
||||
namespace :spec do
|
||||
spec_defaults = lambda do |spec|
|
||||
spec.rspec_opts = ['--options', 'spec/spec.opts']
|
||||
end
|
||||
|
||||
require 'rspec/core/rake_task'
|
||||
RSpec::Core::RakeTask.new('unit') do |task|
|
||||
spec_defaults.call(task)
|
||||
task.pattern = 'spec/unit/**/*_spec.rb'
|
||||
end
|
||||
|
||||
RSpec::Core::RakeTask.new('integration') do |task|
|
||||
spec_defaults.call(task)
|
||||
task.pattern = 'spec/integration/**/*_spec.rb'
|
||||
end
|
||||
|
||||
RSpec::Core::RakeTask.new('coverage') do |task|
|
||||
spec_defaults.call(task)
|
||||
task.pattern = 'spec/{unit,integration}/*_spec.rb'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
task :default => :spec
|
|
@ -0,0 +1,3 @@
|
|||
--color
|
||||
--order random
|
||||
--format d
|
|
@ -7,3 +7,5 @@ if ENV['SIMPLECOV']
|
|||
end
|
||||
|
||||
require 'rubella'
|
||||
require 'rubella/storage'
|
||||
require 'rubella/input/json'
|
Loading…
Reference in New Issue