Sha256: 01c2c1d6ca86ee64b7d4acbde03e833b8e8ff0cff7a2b25e3523241ed22182e2
Contents?: true
Size: 1.01 KB
Versions: 12
Compression:
Stored size: 1.01 KB
Contents
require 'rake' namespace :tarantula do desc 'Run tarantula tests.' task :test do rm_rf "tmp/tarantula" Rake::TestTask.new(:tarantula_test) do |t| t.libs << 'test' t.pattern = 'test/tarantula/**/*_test.rb' t.verbose = true end Rake::Task[:tarantula_test].invoke end desc 'Run tarantula tests and open results in your browser.' task :report do begin Rake::Task['tarantula:test'].invoke rescue RuntimeError => e puts e.message end Dir.glob("tmp/tarantula/**/index.html") do |file| if PLATFORM['darwin'] system("open #{file}") elsif PLATFORM[/linux/] system("firefox #{file}") else puts "You can view tarantula results at #{file}" end end end desc 'Generate a default tarantula test' task :setup do mkdir_p "test/tarantula" template_path = File.expand_path(File.join(File.dirname(__FILE__), "../../..", "template", "tarantula_test.rb")) cp template_path, "test/tarantula/" end end
Version data entries
12 entries across 12 versions & 3 rubygems