blob: df447331df1d6fa360da6d8705c21297beabc685 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
require 'rspec/core/rake_task'
require './lib/ruby2d/version'
task default: 'all'
def run_test(file)
Rake::Task['build'].invoke
Rake::Task['spec'].invoke
system "( cd tests/ ; ruby #{file}.rb )"
end
desc "Run the specs"
RSpec::Core::RakeTask.new do |t|
t.pattern = "spec/*spec.rb"
end
desc "Build Gem"
task :build do
puts "==> uninstall gem"
system "gem uninstall ruby2d --executables"
puts "==> build gem"
system "gem build ruby2d.gemspec --verbose"
puts "==> install gem"
system "gem install ruby2d-#{Ruby2D::VERSION}.gem "\
"--local --verbose -- --no-brew"
end
desc "Run testcard"
task :testcard do
run_test 'testcard'
end
desc "Run input"
task :input do
run_test 'input'
end
desc "Run controller"
task :controller do
run_test 'controller'
end
desc "Test and build"
task :all do
Rake::Task['build'].invoke
Rake::Task['spec'].invoke
end
|