Class: Petitest::Configuration
- Inherits:
-
Object
- Object
- Petitest::Configuration
- Defined in:
- lib/petitest/configuration.rb
Instance Attribute Summary collapse
- #backtrace_filters ⇒ Array<String>
- #color ⇒ Boolean
- #color_scheme ⇒ Hash{Symbol => Symbol}
- #output ⇒ IO
- #subscribers ⇒ Array<Petitest::Subscribers::BaseSubscriber>
Instance Attribute Details
#backtrace_filters ⇒ Array<String>
14 15 16 17 18 19 |
# File 'lib/petitest/configuration.rb', line 14 def backtrace_filters @backtrace_filters ||= begin path = ::File.("../..", __FILE__) [-> (line) { line.start_with?(path) }] end end |
#color ⇒ Boolean
22 23 24 |
# File 'lib/petitest/configuration.rb', line 22 def color @color ||= true end |
#color_scheme ⇒ Hash{Symbol => Symbol}
27 28 29 30 31 32 33 34 |
# File 'lib/petitest/configuration.rb', line 27 def color_scheme @color_scheme ||= { detail: :cyan, error: :red, pass: :green, skip: :yellow, } end |
#output ⇒ IO
37 38 39 40 41 |
# File 'lib/petitest/configuration.rb', line 37 def output @output ||= ::STDOUT.tap do |io| io.sync = true end end |
#subscribers ⇒ Array<Petitest::Subscribers::BaseSubscriber>
44 45 46 |
# File 'lib/petitest/configuration.rb', line 44 def subscribers @subscribers ||= [::Petitest::Subscribers::DocumentReportSubscriber.new] end |