Class: TestData::Configurators::CableYaml

Inherits:
Object
  • Object
show all
Defined in:
lib/test_data/configurators/cable_yaml.rb

Instance Method Summary collapse

Constructor Details

#initializeCableYaml

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

#configureObject



20
21
22
# File 'lib/test_data/configurators/cable_yaml.rb', line 20

def configure
  @generator.call
end

#verifyObject



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