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
43 44 45 46 47 |
# File 'lib/anyt/config.rb', line 43 def example_filter return unless filter_tests /#{filter_tests}/i end |
#filter_tests? ⇒ Boolean
29 30 31 |
# File 'lib/anyt/config.rb', line 29 def filter_tests? only_tests || except_tests end |
#tests_filter ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/anyt/config.rb', line 33 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 |
#tests_path ⇒ Object
23 24 25 26 27 |
# File 'lib/anyt/config.rb', line 23 def tests_path return unless tests_relative_path File.(tests_relative_path, Dir.pwd) end |