Sha256: a712e91426d3304d31a178f2cb6b38a9e942af3f88ab92d20cb7833ad5f8e6a5

Contents?: true

Size: 916 Bytes

Versions: 4

Compression:

Stored size: 916 Bytes

Contents

require 'lib/databasion'

Given /a set of YAML data/ do
  @config = YAML.load(File.open('config/google.yml'))
  @opts = load_opts
  @parse_data = load_parse_data
  Databasion::YamlBuilder.run(@parse_data, @config, @opts)
end

When /we run the BuildMigration system/ do
  Databasion::BuildMigration.run(Dir['%s/%s/**.yml' % [@opts[:env], @config['output']['yaml_path']]], @config, @opts)
end

Then /it should build a migration, model, and database file/ do
  File.exist?('%s/%s/%s/100_%s_migration.rb' % [@opts[:env], @config['output']['migrations']['path'], @parse_data['connection']['dbname'], @parse_data['name']]).should == true
  File.exist?('%s/%s/%s.rb' % [@opts[:env], @config['output']['migrations']['models'], @parse_data['name']]).should == true
  File.exist?('config/database.%s.yml' % @opts[:env]).should == true
  FileUtils.rm_rf @opts[:env]
  FileUtils.rm_rf 'config/database.%s.yml' % @opts[:env]
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
databasion-0.2.3 features/step_definitions/build_migration_steps.rb
databasion-0.2.2 features/step_definitions/build_migration_steps.rb
databasion-0.2.1 features/step_definitions/build_migration_steps.rb
databasion-0.2.0 features/step_definitions/build_migration_steps.rb