Sha256: b3acaa9d1743b24e0fd286348d969b2a95a06c9b7c3ced4e6d5d07b70536fe32

Contents?: true

Size: 934 Bytes

Versions: 16

Compression:

Stored size: 934 Bytes

Contents

# ensure spec task is defined if rspec is in the project
begin
  require "rspec/core/rake_task"
  RSpec::Core::RakeTask.new(:spec)
rescue LoadError
end unless Rake::Task.task_defined?(:spec)

task :set_test_env do
  ENV["RAILS_ENV"] = "test"
  RAILS_ENV = "test"
end

task :bootstrap_test => [:set_test_env, :bootstrap]

task :parallel => ["parallel:create", "parallel:prepare", "parallel:features"]

Rake::Task[:default].clear if Rake::Task.task_defined?(:default)
desc "Bootstrap the current project and run the tests."
task :default => [:bootstrap_test] do
  invoke_task_if_exists "spec"
  invoke_task_if_exists "spec:javascripts"

  if ENV["CI"] && Rake::Task.task_defined?("parallel:features")
    Rake::Task["parallel"].invoke
  else
    invoke_task_if_exists "cucumber"
  end
end

task :ci => [:set_ci_env, :bootstrap_test, "log:clear", "assets:clean", "assets:precompile", :default]

task :set_ci_env do
  ENV["CI"] = "1"
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
bard-rake-0.19.1 lib/bard/rake/testing.rb
bard-rake-0.18.5 lib/bard/rake/testing.rb
bard-rake-0.18.4 lib/bard/rake/testing.rb
bard-rake-0.18.3 lib/bard/rake/testing.rb
bard-rake-0.18.2 lib/bard/rake/testing.rb
bard-rake-0.18.1 lib/bard/rake/testing.rb
bard-rake-0.18.0 lib/bard/rake/testing.rb
bard-rake-0.17.3 lib/bard/rake/testing.rb
bard-rake-0.17.2 lib/bard/rake/testing.rb
bard-rake-0.17.1 lib/bard/rake/testing.rb
bard-rake-0.17.0 lib/bard/rake/testing.rb
bard-rake-0.16.1 lib/bard/rake/testing.rb
bard-rake-0.16.0 lib/bard/rake/testing.rb
bard-rake-0.15.0 lib/bard/rake/testing.rb
bard-rake-0.14.1 lib/bard/rake/testing.rb
bard-rake-0.14.0 lib/bard/rake/testing.rb