Class: Spinach::Config
- Inherits:
-
Object
- Object
- Spinach::Config
- Defined in:
- lib/spinach/config.rb
Overview
The config object holds all the runtime configurations needed for spinach to run.
Instance Attribute Summary collapse
-
#default_reporter ⇒ Object
The default reporter is the reporter spinach will use if there’s no other specified.
-
#failure_exceptions ⇒ Array<Exception>
The failure exceptions return an array of exceptions to be captured and considered as failures (as opposite of errors).
-
#step_definitions_path ⇒ String
The “step definitions path” holds the place where your feature step classes will be searched for.
-
#support_path ⇒ String
The “support path” helds the place where you can put your configuration files.
Instance Method Summary collapse
-
#[](attribute) ⇒ Object
Allows you to read the config object using a hash-like syntax.
-
#[]=(attribute, value) ⇒ Object
Allows you to set config properties using a hash-like syntax.
Instance Attribute Details
#default_reporter ⇒ Object
The default reporter is the reporter spinach will use if there’s no other specified. Defaults to Spinach::Reporter::Stdout, which will print all output to the standard output
52 53 54 |
# File 'lib/spinach/config.rb', line 52 def default_reporter @default_reporter || Spinach::Reporter::Stdout.new end |
#failure_exceptions ⇒ Array<Exception>
The failure exceptions return an array of exceptions to be captured and considered as failures (as opposite of errors)
93 94 95 |
# File 'lib/spinach/config.rb', line 93 def failure_exceptions @failure_exceptions ||= [] end |
#step_definitions_path ⇒ String
The “step definitions path” holds the place where your feature step classes will be searched for. Defaults to ‘features/steps’
33 34 35 |
# File 'lib/spinach/config.rb', line 33 def step_definitions_path @step_definitions_path || 'features/steps' end |
#support_path ⇒ String
The “support path” helds the place where you can put your configuration files.
44 45 46 |
# File 'lib/spinach/config.rb', line 44 def support_path @support_path || 'features/support' end |
Instance Method Details
#[](attribute) ⇒ Object
Allows you to read the config object using a hash-like syntax.
66 67 68 |
# File 'lib/spinach/config.rb', line 66 def [](attribute) self.send(attribute) end |
#[]=(attribute, value) ⇒ Object
Allows you to set config properties using a hash-like syntax.
83 84 85 |
# File 'lib/spinach/config.rb', line 83 def []=(attribute, value) self.send("#{attribute}=", value) end |