# The list of task for a Rake file can be seen with `rake -T` require 'rspec/core/rake_task' # See https://relishapp.com/rspec/rspec-core/docs/command-line/rake-task for details # This runs `rspec` command with the following options. Type `rake spec` to run this task <%= spec_task %> t.pattern = "spec/*_spec.rb" # Run all specs in 'spec' folder ending in '_spec' <%= 't.fail_on_error = false' if options[:ci] == 'jenkins' %> end task default: :spec # This runs the 'spec' task by default when no task is mentioned. E.g., if only `rake` is typed <% if @virtual %> desc 'Start virtual web service' task :start_test_server do ENV['test_server_pid'] = Process.spawn('soaspec-virtual-server', err: %w[logs/test_server.log w]).to_s puts 'Running test server at pid ' + ENV['test_server_pid'] sleep 0.5 # Wait a little for virtual server to start up end <% end %>