Class: Turn::CrossRunner

### Home Classes Methods

### In Files

- lib/turn/runners/crossrunner.rb

### Parent

IsoRunner

### Methods

- #start

### Files

- History.txt
- LICENSE.txt
- Release.txt
- Version.txt

### Class/Module Index

Quicksearch

- Turn
- Turn::Colorize
- Turn::Command
- Turn::Configuration
- Turn::Controller
- Turn::CrossRunner
- Turn::CueReporter
- Turn::DotReporter
- Turn::IsoRunner
- Turn::MarshalReporter
- Turn::MiniRunner
- Turn::OutlineReporter
- Turn::PrettyReporter
- Turn::ProgressReporter
- Turn::Reporter
- Turn::SoloRunner
- Turn::TestCase
- Turn::TestMethod
- Turn::TestRunner
- Turn::TestSuite
- Turn::ToptenDecorator
- Test
- Test::Unit
- Test::Unit::Failure
- Object
- String

No matching classes.

# Turn::CrossRunner

# Cross Runner

Cross Runner runs test in pairs.

TODO: This needs work in the test_loop_runner.

    It needs to show the files being cross tested.

TODO: Cross runner output needs to be fixed

### Public Instance Methods

start() click to toggle source

    # File lib/turn/runners/crossrunner.rb, line 15
    def start
      suite = TestSuite.new

      files = @config.files
      viles = @config.files # TODO: make selectable ?

      #files = files.select{ |f| File.extname(f) == '.rb' and File.file?(f) }
      #viles = viles.select{ |f| File.extname(f) == '.rb' and File.file?(f) }

      pairs = files.inject([]){ |m, f| viles.collect{ |v| m << [f,v] }; m }
      pairs = pairs.reject{ |f,v| f == v }

      max = files.collect{ |f| f.sub(Dir.pwd+'/','').size }.max

      testruns = pairs.collect do |file1, file2|
        name1 = file1.sub(Dir.pwd+'/','')
        name2 = file2.sub(Dir.pwd+'/','')
        name = "%-#{max}s %-#{max}s" % [name1, name2]
        suite.new_case(name, file1, file2)
      end

      test_loop_runner(suite)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.