1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/test/generators/generators_test_helper.rb

30 lines
639 B
Ruby
Raw Normal View History

require 'abstract_unit'
module Rails
def self.root
@root ||= File.expand_path(File.join(File.dirname(__FILE__), '..', 'fixtures'))
end
end
Rails.application.config.root = Rails.root
require 'rails/generators'
2010-01-03 09:13:54 -05:00
require 'rails/generators/test_case'
require 'rubygems'
2009-09-14 15:54:43 -04:00
require 'active_record'
require 'action_dispatch'
2010-01-03 09:13:54 -05:00
class GeneratorsTestCase < Rails::Generators::TestCase
destination File.join(Rails.root, "tmp")
setup :prepare_destination
2009-06-25 04:44:46 -04:00
def self.inherited(base)
base.tests Rails::Generators.const_get(base.name.sub(/Test$/, ''))
rescue
# Do nothing.
end
2010-01-03 18:31:53 -05:00
def test_truth
# Don't cry test/unit
end
2010-01-03 09:13:54 -05:00
end