Class: Cbratest::TestsToRunSelector

Inherits:
Object
  • Object
show all
Defined in:
lib/cobratest/tests_to_run_selector.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(suffix = 'test.sh') ⇒ TestsToRunSelector

Returns a new instance of TestsToRunSelector.



5
6
7
# File 'lib/cobratest/tests_to_run_selector.rb', line 5

def initialize(suffix = 'test.sh')
  @suffix = suffix
end

Instance Attribute Details

#suffixObject (readonly)

Returns the value of attribute suffix.



3
4
5
# File 'lib/cobratest/tests_to_run_selector.rb', line 3

def suffix
  @suffix
end

Instance Method Details

#list(affected) ⇒ Object



9
10
11
12
13
14
# File 'lib/cobratest/tests_to_run_selector.rb', line 9

def list(affected)
  affected.keys.inject([]) do |memo, key|
    memo << File.join(key[:options][:path], suffix) if affected[key]
    memo
  end
end