Sha256: 2454525fd57b236f1b9be51f932a59dac597d222ae550cef2539e577f993110e

Contents?: true

Size: 935 Bytes

Versions: 12

Compression:

Stored size: 935 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

12 entries across 12 versions & 1 rubygems

Version Path
soaspec-0.2.8 Rakefile
soaspec-0.2.7 Rakefile
soaspec-0.2.5 Rakefile
soaspec-0.2.4 Rakefile
soaspec-0.2.3 Rakefile
soaspec-0.2.2 Rakefile
soaspec-0.2.1 Rakefile
soaspec-0.2.0 Rakefile
soaspec-0.1.18 Rakefile
soaspec-0.1.17 Rakefile
soaspec-0.1.16 Rakefile
soaspec-0.1.15 Rakefile