Class: TestData::Configurators::CableYaml
- Inherits:
-
Object
- Object
- TestData::Configurators::CableYaml
- Defined in:
- lib/test_data/configurators/cable_yaml.rb
Instance Method Summary collapse
- #configure ⇒ Object
-
#initialize ⇒ CableYaml
constructor
A new instance of CableYaml.
- #verify ⇒ Object
Constructor Details
#initialize ⇒ CableYaml
Returns a new instance of CableYaml.
4 5 6 7 |
# File 'lib/test_data/configurators/cable_yaml.rb', line 4 def initialize @generator = CableYamlGenerator.new @config = TestData.config end |
Instance Method Details
#configure ⇒ Object
20 21 22 |
# File 'lib/test_data/configurators/cable_yaml.rb', line 20 def configure @generator.call end |
#verify ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/test_data/configurators/cable_yaml.rb', line 9 def verify if !File.exist?(@config.cable_yaml_full_path) || YAML.load_file(@config.cable_yaml_full_path).key?("test_data") ConfigurationVerification.new(looks_good?: true) else ConfigurationVerification.new(problems: [ "'#{@config.cable_yaml_path}' exists but does not contain a 'test_data' section" ]) end end |