Sha256: ccdaab606bacffd841b49c1878da93a3d9a00fa0517fcb395d225fd945ce5d77

Contents?: true

Size: 769 Bytes

Versions: 5

Compression:

Stored size: 769 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../test_helper')

class PluginTestMigrationGeneratorTest < Test::Unit::TestCase
  def setup
    setup_app('empty')
    
    require 'rails_generator'
    require 'rails_generator/scripts/generate'
    Rails::Generator::Base.sources << Rails::Generator::PathSource.new(:plugin_test_migration, "#{Rails.root}/../../generators")
    Rails::Generator::Scripts::Generate.new.run(['plugin_test_migration', 'acts_as_foo', 'create_bars'])
  end
  
  def test_should_create_migration
    migration_path = Dir["#{Rails.root}/vendor/plugins/acts_as_foo/test/app_root/db/migrate/*"].first
    assert_not_nil migration_path
    assert_match /^.*_create_bars.rb$/, migration_path
  end
  
  def teardown
    teardown_app
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
plugin_test_helper-0.3.1 test/functional/plugin_test_migration_generator_test.rb
plugin_test_helper-0.3.0 test/functional/plugin_test_migration_generator_test.rb
plugin_test_helper-0.1.6 test/functional/plugin_test_migration_generator_test.rb
plugin_test_helper-0.2.0 test/functional/plugin_test_migration_generator_test.rb
plugin_test_helper-0.2.1 test/functional/plugin_test_migration_generator_test.rb