Class: RSpecTelemetry::Config
- Inherits:
-
Object
- Object
- RSpecTelemetry::Config
- Defined in:
- lib/rspec_telemetry/config.rb
Instance Attribute Summary collapse
-
#capture_examples ⇒ Object
Returns the value of attribute capture_examples.
-
#capture_factory_bot ⇒ Object
Returns the value of attribute capture_factory_bot.
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#flush_each ⇒ Object
Returns the value of attribute flush_each.
-
#output_path ⇒ Object
Returns the value of attribute output_path.
-
#print_summary ⇒ Object
Returns the value of attribute print_summary.
-
#slow_example_threshold_ms ⇒ Object
Returns the value of attribute slow_example_threshold_ms.
-
#slow_factory_threshold_ms ⇒ Object
Returns the value of attribute slow_factory_threshold_ms.
-
#summary_io ⇒ Object
Returns the value of attribute summary_io.
-
#summary_limit ⇒ Object
Returns the value of attribute summary_limit.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rspec_telemetry/config.rb', line 18 def initialize @enabled = true @output_path = self.class.default_output_path @capture_examples = true @capture_factory_bot = true @print_summary = false @flush_each = false @slow_factory_threshold_ms = nil @slow_example_threshold_ms = nil @summary_io = $stderr @summary_limit = 20 end |
Instance Attribute Details
#capture_examples ⇒ Object
Returns the value of attribute capture_examples.
5 6 7 |
# File 'lib/rspec_telemetry/config.rb', line 5 def capture_examples @capture_examples end |
#capture_factory_bot ⇒ Object
Returns the value of attribute capture_factory_bot.
5 6 7 |
# File 'lib/rspec_telemetry/config.rb', line 5 def capture_factory_bot @capture_factory_bot end |
#enabled ⇒ Object
Returns the value of attribute enabled.
5 6 7 |
# File 'lib/rspec_telemetry/config.rb', line 5 def enabled @enabled end |
#flush_each ⇒ Object
Returns the value of attribute flush_each.
5 6 7 |
# File 'lib/rspec_telemetry/config.rb', line 5 def flush_each @flush_each end |
#output_path ⇒ Object
Returns the value of attribute output_path.
5 6 7 |
# File 'lib/rspec_telemetry/config.rb', line 5 def output_path @output_path end |
#print_summary ⇒ Object
Returns the value of attribute print_summary.
5 6 7 |
# File 'lib/rspec_telemetry/config.rb', line 5 def print_summary @print_summary end |
#slow_example_threshold_ms ⇒ Object
Returns the value of attribute slow_example_threshold_ms.
5 6 7 |
# File 'lib/rspec_telemetry/config.rb', line 5 def slow_example_threshold_ms @slow_example_threshold_ms end |
#slow_factory_threshold_ms ⇒ Object
Returns the value of attribute slow_factory_threshold_ms.
5 6 7 |
# File 'lib/rspec_telemetry/config.rb', line 5 def slow_factory_threshold_ms @slow_factory_threshold_ms end |
#summary_io ⇒ Object
Returns the value of attribute summary_io.
5 6 7 |
# File 'lib/rspec_telemetry/config.rb', line 5 def summary_io @summary_io end |
#summary_limit ⇒ Object
Returns the value of attribute summary_limit.
5 6 7 |
# File 'lib/rspec_telemetry/config.rb', line 5 def summary_limit @summary_limit end |
Class Method Details
.default_output_path ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/rspec_telemetry/config.rb', line 31 def self.default_output_path suffix = ENV["TEST_ENV_NUMBER"] if suffix && !suffix.empty? "tmp/rspec_telemetry.#{suffix}.ndjson" else "tmp/rspec_telemetry.ndjson" end end |