-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRakefile
More file actions
27 lines (22 loc) · 728 Bytes
/
Rakefile
File metadata and controls
27 lines (22 loc) · 728 Bytes
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
require "bundler/gem_tasks"
require "rake/testtask"
DEFAULT_TEST_VM = "kernel-3.10-ruby-2.2"
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/**/*_test.rb']
t.verbose = true
end
desc "Bring up Vagrant VM for testing"
task "vagrant:up" do
# `unset` call due to https://github.com/mitchellh/vagrant/issues/3193
system("unset RUBYLIB RUBYOPT; vagrant up #{DEFAULT_TEST_VM}")
end
task :default do
if RUBY_PLATFORM =~ /linux/
Rake::Task['test'].invoke
else
Rake::Task['vagrant:up'].invoke
# `unset` call due to https://github.com/mitchellh/vagrant/issues/3193
system("unset RUBYLIB RUBYOPT; vagrant ssh #{DEFAULT_TEST_VM} -c 'cd /vagrant && bundle && rake test'")
end
end