Sha256: b96a0462d7ce2258b1bdb61b17210c02b7ddde2317e2b674e395fe150f387d45

Contents?: true

Size: 755 Bytes

Versions: 1

Compression:

Stored size: 755 Bytes

Contents

require File.expand_path('../../test_helper', __FILE__)
require 'tmpdir'
require 'fileutils'

describe 'zeus-parallel_tests' do
  before do
    @project_dir = File.expand_path(Dir.mktmpdir)
    Dir.mkdir(File.join(@project_dir, "script"))

    bin = File.expand_path('../../../bin/zeus-parallel_tests', __FILE__)
    @run = -> { system("#{bin} init &>/dev/null", chdir: @project_dir) }
  end

  after do
    FileUtils.rm_rf @project_dir
    @io && @io.close
  end

  it "creates zeus configuration and script/spec in projects directory" do
    @run.call

    expected_files = ['zeus.json', 'custom_plan.rb'].
      map { |f| File.join(@project_dir, f) }

    expected_files.each do |f|
      assert File.exists?(f), "#{f} should exists"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
zeus-parallel_tests-0.2.0.beta1 test/slow/zeus-parallel_tests_test.rb