Sha256: a32febc750c2427d45e17339d11722086cc751bcecaa13e62ba5901c146e4077

Contents?: true

Size: 926 Bytes

Versions: 2

Compression:

Stored size: 926 Bytes

Contents

require "bundler/gem_tasks"
require 'cucumber/rake/task'
require 'rspec/core/rake_task'


def set_cucumber_options(options)
  ENV['CUCUMBER_OPTS'] = options
end

def combine_options(set_1, set_2)
  set_2 ? "#{set_1} #{set_2}" : set_1
end


task :clear_coverage do
  code_coverage_directory = "#{File.dirname(__FILE__)}/coverage"

  FileUtils.remove_dir(code_coverage_directory, true)
end

desc 'Run all Cucumber tests for the gem'
task :tests, [:options] do |t, args|
  set_cucumber_options(combine_options("-t ~@wip -t ~@off -f progress", args[:options]))
end
Cucumber::Rake::Task.new(:tests)

desc 'Run all RSpec tests for the gem'
RSpec::Core::RakeTask.new(:specs) do |t|
  t.rspec_opts = "-t ~wip -t ~off"
end

desc 'Run All The Things'
task :everything => :clear_coverage do
  Rake::Task[:specs].invoke
  Rake::Task[:tests].invoke('-t ~@redundant')
end

task :default => :everything

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cuke_modeler-0.0.2 Rakefile
cuke_modeler-0.0.1 Rakefile