Sha256: fe7675ab1d7f52b67539e19aa6c0f66c2d1634aca5d8b8115d72c243739f269b

Contents?: true

Size: 936 Bytes

Versions: 3

Compression:

Stored size: 936 Bytes

Contents

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

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

desc 'Run tests'
RSpec::Core::RakeTask.new(spec: %i[clean clobber start_test_server]) do |t|
  t.pattern = "spec/**/#{ENV['folder']}*/#{ENV['test']}*_spec.rb"
end

task default: :spec

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

desc 'Start virtual web service'
task :start_test_server do
  ENV['leave_server_running'] = 'true' # This will stop created suites from killing this service
  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

YARD::Rake::YardocTask.new do |t|
  t.files = %w[features/**/*.feature features/**/*.rb lib/soaspec/cucumber/*.rb] # lib/soaspec/cucumber/*.rb]
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
soaspec-0.2.11 Rakefile
soaspec-0.2.10 Rakefile
soaspec-0.2.9 Rakefile