Sha256: ae083adf54e53d9ced8ce9082641108c5d97fc2b6eab60cc7439c37ca2466382
Contents?: true
Size: 909 Bytes
Versions: 2
Compression:
Stored size: 909 Bytes
Contents
require 'rubygems' require 'test/unit' require 'rails/all' require 'rails/generators' require 'rails/generators/test_case' require 'rabl/generators' class TestApp < Rails::Application config.root = File.dirname(__FILE__) end Rails.application = TestApp module Rails def self.root @root ||= File.expand_path(File.join(File.dirname(__FILE__), '..', 'tmp', 'rails')) end end Rails.application.config.root = Rails.root # Call configure to load the settings from # Rails.application.config.generators to Rails::Generators Rails::Generators.configure! Rails.application.config.generators Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} def copy_routes routes = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'routes.rb')) destination = File.join(Rails.root, "config") FileUtils.mkdir_p(destination) FileUtils.cp File.expand_path(routes), destination end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rabl-generators-0.2.0 | test/test_helper.rb |
rabl-generators-0.1.1 | test/test_helper.rb |