Class: Anyt::Config
- Inherits:
-
Anyway::Config
- Object
- Anyway::Config
- Anyt::Config
- Defined in:
- lib/anyt/config.rb
Overview
Anyt configuration
Instance Method Summary collapse
Instance Method Details
#example_filter ⇒ Object
46 47 48 49 50 |
# File 'lib/anyt/config.rb', line 46 def example_filter return unless filter_tests /#{filter_tests}/i end |
#filter_tests? ⇒ Boolean
32 33 34 |
# File 'lib/anyt/config.rb', line 32 def filter_tests? only_tests || except_tests end |
#test_paths ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/anyt/config.rb', line 24 def test_paths return unless tests_relative_path tests_relative_path.split(",").map do |path| File.(path, Dir.pwd) end end |
#tests_filter ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/anyt/config.rb', line 36 def tests_filter only_rxp = /(#{only_tests.join("|")})/ if only_tests except_rxp = /(#{except_tests.join("|")})/ if except_tests @tests_filter ||= lambda do |path| (only_rxp.nil? || only_rxp.match?(path)) && (except_rxp.nil? || !except_rxp.match?(path)) end end |