Class: Autotest::Suffix

Inherits:
Autotest
  • Object
show all
Defined in:
lib/autotest/suffix.rb

Constant Summary collapse

VERSION =
"1.0.2"

Instance Method Summary collapse

Constructor Details

#initializeSuffix

:nodoc:



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/autotest/suffix.rb', line 6

def initialize # :nodoc:
  super

  clear_mappings

  add_mapping %r%^lib/(.*)\.rb$% do |_, m|
    files_matching %r%^test/#{m[1]}.*_test.rb$%
  end

  add_mapping %r%^test/.*_test\.rb$% do |filename, _|
    filename
  end
end