Sha256: 20931978676db7fa4d7ad8939d2d456655e00ea2149744141f4b81303e60f24b

Contents?: true

Size: 697 Bytes

Versions: 9

Compression:

Stored size: 697 Bytes

Contents

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'rake/clean'

ENV['folder'] ||= ''
ENV['test'] ||= ''

RSpec::Core::RakeTask.new(:run_spec) do |t|
  t.pattern = "spec/**/#{ENV['folder']}*/#{ENV['test']}*_spec.rb"
end

desc 'Run tests'
task spec: %w[clean clobber start_test_server run_spec]

task default: :spec

CLEAN.include 'tmp/*'
CLOBBER.include 'logs/*'

desc 'Start virtual web service'
task :start_test_server do
  mkdir_p 'logs'
  ENV['test_server_pid'] = Process.spawn('ruby', 'exe/soaspec-virtual-server', err: %w[logs/test_server.log w]).to_s
  sleep 2 # Wait a little for virtual server to start up
  puts 'Running test server at pid ' + ENV['test_server_pid']
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
soaspec-0.0.77 Rakefile
soaspec-0.0.76 Rakefile
soaspec-0.0.75 Rakefile
soaspec-0.0.74 Rakefile
soaspec-0.0.73 Rakefile
soaspec-0.0.72 Rakefile
soaspec-0.0.71 Rakefile
soaspec-0.0.70 Rakefile
soaspec-0.0.69 Rakefile