Sha256: 5a3862783fa484a5ff528193f1fca466e3d1468f3de4355e2d7cdbb25d617c33

Contents?: true

Size: 924 Bytes

Versions: 10

Compression:

Stored size: 924 Bytes

Contents

require 'lib/databasion'

Given /a complete set of YAML definitions/ do
  @config = YAML.load(File.open('config/google.yml'))

  @parse_data = {
    'name'        => 'mock',
    'plural'      => true,
    'fields'      => ["id", "name", "power"],
    'types'       => ["integer", "string, 20", "string, 40"],
    'data'        => [[1, "Brian Jones", "Super Intelligence"], [2, "Superman", "Invincible"], [3, "Batman", "Strength"]],
    'ignore_cols' => [2],
    'connection'  => [{'database' => 'moon'}]
  }
  Databasion::Yamalize.yamlbate(@parse_data, @config['output']['yaml_path'])

  @files = Dir["%s/%s.yml" % [@config['output']['yaml_path'], @parse_data['name']]]
end

When /the YAML files are parsed/ do
  Databasion::Migitize.migrabate(@files, @config)
end

Then /the result is Ruby migration files/ do
  File.exist?("%s/100_%s.rb" % [@config['output']['migrations']['path'], @parse_data['name']]).should == true
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
databasion-0.1.0 features/databasion/step_definitions/migitize_steps.rb
databasion-0.0.9 features/databasion/step_definitions/migitize_steps.rb
databasion-0.0.8 features/databasion/step_definitions/migitize_steps.rb
databasion-0.0.7 features/databasion/step_definitions/migitize_steps.rb
databasion-0.0.6 features/databasion/step_definitions/migitize_steps.rb
databasion-0.0.5 features/databasion/step_definitions/migitize_steps.rb
databasion-0.0.4 features/databasion/step_definitions/migitize_steps.rb
databasion-0.0.3 features/databasion/step_definitions/migitize_steps.rb
databasion-0.0.2 features/databasion/step_definitions/migitize_steps.rb
databasion-0.0.1 features/databasion/step_definitions/migitize_steps.rb