Module: BitGirder::Testing

Defined in:
lib/bitgirder/testing.rb

Defined Under Namespace

Modules: AfterPhase, AssertMethods, BeforePhase, TestClassMixin, TestPhase Classes: AbstractPhaseClass, AssertionFailure, TestHolder, TestRunClass

Constant Summary collapse

ENV_TEST_DATA_PATH =
"TEST_DATA_PATH"

Class Method Summary collapse

Class Method Details

.find_test_data(name) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/bitgirder/testing.rb', line 8

def self.find_test_data( name )
    
    ( ENV[ ENV_TEST_DATA_PATH ] || "" ).split( ":" ).
        map { |path| "#{path}/#{name}" }.
        find { |f| File.exists?( f ) } or
        raise "No #{name} found on path $#{ENV_TEST_DATA_PATH}"
end