Sha256: 7d8f4ea7570f9825b7f2d6c3bf21049eaeea4fb5ac0090308fdaa6668fae6181
Contents?: true
Size: 1001 Bytes
Versions: 1
Compression:
Stored size: 1001 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']}*/,tmp/*/spec/}#{ENV['test']}*_spec.rb" end desc 'Prepare log files' task :logs do mkdir_p 'logs' touch 'logs/traffic.log' end desc 'Use soaspec_init in tmp to generate test files. Used for verifying it' task :use_soaspec_init do mkdir_p 'tmp' mkdir_p 'tmp/init' puts `cd tmp/init && ruby ../../exe/soaspec-init` end desc 'Run tests' task spec: %w[clean clobber use_soaspec_init logs start_test_server run_spec] task default: :spec CLEAN.include 'tmp/*' CLOBBER.include 'logs/*' desc 'Start virtual web service' task :start_test_server do ENV['test_server_pid'] = Process.spawn('ruby', 'exe/soaspec-virtual-server', err: %w[logs/test_server.log w]).to_s sleep 1 # Wait a little for virtual server to start up puts 'Running test server at pid ' + ENV['test_server_pid'] end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
soaspec-0.0.55 | Rakefile |