Sha256: 941b1393983caa6576a0ef9ececf195439e3c1c2c321126bf9518852fc6a10bf

Contents?: true

Size: 1.28 KB

Versions: 35

Compression:

Stored size: 1.28 KB

Contents

# TODO

    # Load each test independently to ensure there are no
    # require dependency issues. This is actually a bit redundant
    # as test-solo will also cover these results. So we may deprecate
    # this in the future. This does not generate a test log entry.

    def test_load(options={})
      options = test_configuration(options)

      tests    = options['tests']
      loadpath = options['loadpath']
      requires = options['requires']
      live     = options['live']
      exclude  = options['exclude']

      files = Dir.multiglob_r(*tests) - Dir.multiglob_r(*exclude)

      return puts("No tests.") if files.empty?

      max   = files.collect{ |f| f.size }.max
      list  = []

      files.each do |f|
        next unless File.file?(f)
        if r = system("ruby -I#{loadpath.join(':')} #{f} > /dev/null 2>&1")
          puts "%-#{max}s  [PASS]" % [f]  #if verbose?
        else
          puts "%-#{max}s  [FAIL]" % [f]  #if verbose?
          list << f
        end
      end

      puts "  #{list.size} Load Failures"

      if verbose?
        unless list.empty?
          puts "\n-- Load Failures --\n"
          list.each do |f|
            print "* "
            system "ruby -I#{loadpath} #{f} 2>&1"
            #puts
          end
          puts
        end
      end
    end

Version data entries

35 entries across 35 versions & 7 rubygems

Version Path
arcabouco-0.2.13 vendor/bundle/gems/turn-0.9.6/lib/turn/runners/loadrunner.rb
TwP-turn-0.5.1 lib/turn/runners/loadrunner.rb
TwP-turn-0.6.0 lib/turn/runners/loadrunner.rb
turn-0.9.7 lib/turn/runners/loadrunner.rb
challah-1.0.0 vendor/bundle/gems/turn-0.9.6/lib/turn/runners/loadrunner.rb
swipe-rails-0.0.5 vendor/bundle/gems/turn-0.9.6/lib/turn/runners/loadrunner.rb
challah-1.0.0.beta3 vendor/bundle/gems/turn-0.9.6/lib/turn/runners/loadrunner.rb
challah-1.0.0.beta2 vendor/bundle/gems/turn-0.9.6/lib/turn/runners/loadrunner.rb
challah-1.0.0.beta vendor/bundle/gems/turn-0.9.6/lib/turn/runners/loadrunner.rb
challah-0.9.1.beta.3 vendor/bundle/gems/turn-0.9.6/lib/turn/runners/loadrunner.rb
challah-0.9.1.beta vendor/bundle/gems/turn-0.9.6/lib/turn/runners/loadrunner.rb
challah-0.9.0 vendor/bundle/gems/turn-0.9.6/lib/turn/runners/loadrunner.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/turn-0.9.6/lib/turn/runners/loadrunner.rb
challah-0.8.3 vendor/bundle/gems/turn-0.9.6/lib/turn/runners/loadrunner.rb
turn-0.9.6 lib/turn/runners/loadrunner.rb
challah-0.6.1 vendor/bundle/gems/turn-0.9.5/lib/turn/runners/loadrunner.rb
challah-0.6.0 vendor/bundle/gems/turn-0.9.5/lib/turn/runners/loadrunner.rb
turn-0.9.5 lib/turn/runners/loadrunner.rb
turn-0.9.4 lib/turn/runners/loadrunner.rb
turn-0.9.3 lib/turn/runners/loadrunner.rb