provider/core.rb
# Generates a single network data file for unit testing.
# Required values in data:
#   out_file: path of data file to create
#   id: a seed value
#   title: The name of object who is unit tested with this spec file
#   object: The Api::Resource used as basis for the network data
Generates a single network data file for unit testing.
Generates a single network data file for unit testing .
def generate_network_data(data)
      formatter = Provider::TestData::SpecFormatter.new(self)
      name = "title#{data[:id]}" if data[:title] == 'title'
      name = "test name##{data[:id]} data" if data[:title] == 'name'
      generate_file data.clone.merge(
        template: 'templates/network_spec.yaml.erb',
        test_data: formatter.generate(data[:object], '', data[:object].kind,
                                      data[:id],
                                      name: name)
      )
    end
def generate_network_data ( data ) formatter = Provider :: TestData :: SpecFormatter . new ( self ) name = "title#{data[:id]}" if data [ :title ] == 'title' name = "test name##{data[:id]} data" if data [ :title ] == 'name' generate_file data . clone . merge ( template : 'templates/network_spec.yaml.erb' , test_data : formatter . generate ( data [ :object ] , '' , data [ :object ] . kind , data [ :id ] , name : name ) ) end
Generates a single network data file for unit testing.
Generates a single network data file for unit testing .
data
<not_specific>