Rakefile in vbox-ng-0.1.3 vs Rakefile in vbox-ng-1.0.0
- old
+ new
@@ -30,19 +30,29 @@
end
Jeweler::RubygemsDotOrgTasks.new
require 'rspec/core'
require 'rspec/core/rake_task'
+
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
end
-RSpec::Core::RakeTask.new(:rcov) do |spec|
- spec.pattern = 'spec/**/*_spec.rb'
- spec.rcov = true
-end
-
task :default => :spec
+
+namespace :spec do
+ desc "record VBoxManage simulation"
+ task :record do
+ ENV['RECORD_VBOXMANAGE'] = '1'
+ Rake::Task[:spec].invoke
+ end
+
+ desc "replay VBoxManage simulation"
+ task :replay do
+ ENV['SIMULATE_VBOXMANAGE'] = '1'
+ Rake::Task[:spec].execute
+ end
+end
#require 'rdoc/task'
#Rake::RDocTask.new do |rdoc|
# version = File.exist?('VERSION') ? File.read('VERSION') : ""
#