Sha256: 30e0ac472b5bc83abb362206df3614a9f16925c18c6d12fbc3b8f783bc5787d6

Contents?: true

Size: 952 Bytes

Versions: 17

Compression:

Stored size: 952 Bytes

Contents

#!/usr/bin/env rake

# require 'bundler'
# Bundler.require :default, :test, :development

require 'filegen'
require 'fedux_org_stdlib/rake_tasks'

require 'coveralls/rake/task'
Coveralls::RakeTask.new

desc 'Run test suite'
task :test do
  Rake::Task['test:before'].execute

  begin
    %w(test:rubocop test:rspec test:cucumber test:after).each { |t| Rake::Task[t].execute }
  ensure
    Rake::Task['test:after'].execute
  end
end

namespace :test do
  desc 'Test with coveralls'
  task coveralls: %w(test coveralls:push)

  require 'rubocop/rake_task'
  RuboCop::RakeTask.new

  desc 'Run rspec'
  task :rspec do
    sh 'bundle exec rspec'
  end

  desc 'Run cucumber'
  task :cucumber do
    sh 'bundle exec cucumber -p all'
  end

  desc 'Setup test environment'
  task :before do
    @web_server = Process.spawn 'rackup -p 65535 script/config.ru'
  end

  desc 'Teardown test environment'
  task :after do
    sh "kill -9 #{@web_server}"
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
proxy_pac_rb-0.6.5 Rakefile
proxy_pac_rb-0.6.4 Rakefile
proxy_pac_rb-0.6.3 Rakefile
proxy_pac_rb-0.6.2 Rakefile
proxy_pac_rb-0.6.1 Rakefile
proxy_pac_rb-0.6.0 Rakefile
proxy_pac_rb-0.5.10 Rakefile
proxy_pac_rb-0.5.9 Rakefile
proxy_pac_rb-0.5.8 Rakefile
proxy_pac_rb-0.5.7 Rakefile
proxy_pac_rb-0.5.6 Rakefile
proxy_pac_rb-0.5.5 Rakefile
proxy_pac_rb-0.5.4 Rakefile
proxy_pac_rb-0.5.3 Rakefile
proxy_pac_rb-0.5.2 Rakefile
proxy_pac_rb-0.5.1 Rakefile
proxy_pac_rb-0.5.0 Rakefile