Sha256: ca7fd89cd93651d4e8b6b536167925b82be58d8feb478fb750d7f3558af780e9

Contents?: true

Size: 974 Bytes

Versions: 27

Compression:

Stored size: 974 Bytes

Contents

require 'spec_helper'
require 'fileutils'

module Beaker
  describe TestSuite do

    context 'new', :use_fakefs => true do
      let(:test_dir) { 'tmp/tests' }

      let(:options)  { {'name' => create_files(@files)} }
      let(:rb_test)  { File.expand_path(test_dir + '/my_ruby_file.rb')    }
      let(:pl_test)  { File.expand_path(test_dir + '/my_perl_file.pl')    }
      let(:sh_test)  { File.expand_path(test_dir + '/my_shell_file.sh')   }

      it 'fails without test files' do
        expect { Beaker::TestSuite.new 'name', 'hosts',
                  Hash.new, :stop_on_error }.to raise_error
      end

      it 'includes specific files as test file when explicitly passed' do
        @files = [ rb_test ]
        ts = Beaker::TestSuite.new 'name', 'hosts', options,
                                             :stop_on_error

        expect { ts.instance_variable_get(:@test_files).
                  include? rb_test }.to be_true
      end

    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
beaker-1.12.2 spec/beaker/test_suite_spec.rb
beaker-1.12.1 spec/beaker/test_suite_spec.rb
beaker-1.12.0 spec/beaker/test_suite_spec.rb
beaker-1.11.2 spec/beaker/test_suite_spec.rb
beaker-1.11.1 spec/beaker/test_suite_spec.rb
beaker-1.11.0 spec/beaker/test_suite_spec.rb
beaker-1.10.0 spec/beaker/test_suite_spec.rb
beaker-1.9.1 spec/beaker/test_suite_spec.rb
beaker-1.9.0 spec/beaker/test_suite_spec.rb
beaker-1.8.2 spec/beaker/test_suite_spec.rb
beaker-1.8.1 spec/beaker/test_suite_spec.rb
beaker-1.8.0 spec/beaker/test_suite_spec.rb
beaker-1.7.0 spec/beaker/test_suite_spec.rb
beaker-1.6.2 spec/beaker/test_suite_spec.rb
beaker-1.6.1 spec/beaker/test_suite_spec.rb
beaker-1.6.0 spec/beaker/test_suite_spec.rb
beaker-1.5.0 spec/beaker/test_suite_spec.rb
beaker-1.4.1 spec/beaker/test_suite_spec.rb
beaker-1.4.0 spec/beaker/test_suite_spec.rb
beaker-1.3.2 spec/beaker/test_suite_spec.rb