diff options
| author | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2017-01-12 11:42:40 +0900 |
|---|---|---|
| committer | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2017-01-12 11:42:40 +0900 |
| commit | 83ddb9a56782a0fa97236289ab9db0e36699bc84 (patch) | |
| tree | dcc24ef4cd55039f4e638b1a0bbed9e7bc57467a /Rakefile | |
| parent | 79060076f217eebf8f8e5f829bd035b47adef06a (diff) | |
| download | vyos-integration-test-83ddb9a56782a0fa97236289ab9db0e36699bc84.tar.gz vyos-integration-test-83ddb9a56782a0fa97236289ab9db0e36699bc84.zip | |
Refactor
Diffstat (limited to 'Rakefile')
| -rw-r--r-- | Rakefile | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -4,14 +4,14 @@ require 'yaml' spec_tasks = [] configs = {} -tests = Dir.glob("spec/*/").map { |s| s.gsub(/spec\//, '').gsub(/\//, '') } +tests = Dir.glob('spec/*/').map { |s| s.gsub(%r{spec/}, '').gsub(%r{/}, '') } tests.each do |test| spec_tasks.concat(["spec:#{test}"]) configs[test] = YAML.load_file("spec/#{test}/config.yaml") end -task :spec => spec_tasks -task :all => "spec:all" +task spec: spec_tasks +task all: 'spec:all' namespace :spec do tests.each do |test| @@ -39,8 +39,8 @@ namespace :spec do Dir.chdir("spec/#{test}") do config.keys.each do |host| RSpec::Core::RakeTask.new(host.to_sym) do |t| - ENV["TARGET_TEST"] = test - ENV["TARGET_HOST"] = host + ENV['TARGET_TEST'] = test + ENV['TARGET_HOST'] = host t.pattern = "spec/#{test}/#{host}_spec.rb" end end |
