Class: Bumps::CucumberConfig
- Inherits:
-
Object
- Object
- Bumps::CucumberConfig
- Defined in:
- lib/bumps/cucumber_config.rb
Instance Method Summary collapse
-
#initialize(source_config) ⇒ CucumberConfig
constructor
A new instance of CucumberConfig.
- #process! ⇒ Object
- #register_formatter ⇒ Object
- #update_bumps_config ⇒ Object
- #validate ⇒ Object
Constructor Details
#initialize(source_config) ⇒ CucumberConfig
Returns a new instance of CucumberConfig.
4 5 6 |
# File 'lib/bumps/cucumber_config.rb', line 4 def initialize source_config @source_config = source_config end |
Instance Method Details
#process! ⇒ Object
8 9 10 11 12 |
# File 'lib/bumps/cucumber_config.rb', line 8 def process! validate update_bumps_config register_formatter end |
#register_formatter ⇒ Object
25 26 27 |
# File 'lib/bumps/cucumber_config.rb', line 25 def register_formatter @source_config.[:formats] << ['Bumps::ResultsPushFormatter', Bumps::Configuration.output_stream] end |
#update_bumps_config ⇒ Object
20 21 22 23 |
# File 'lib/bumps/cucumber_config.rb', line 20 def update_bumps_config Bumps::Configuration.feature_directory = @source_config.feature_dirs.first Bumps::Configuration.output_stream = @source_config.out_stream end |
#validate ⇒ Object
14 15 16 17 18 |
# File 'lib/bumps/cucumber_config.rb', line 14 def validate = 'More than one feature directory/file was specified. ' + 'Please only specify a single feature directory when using bumps' raise if @source_config.feature_dirs.size > 1 end |