Sha256: 78310899c118e8d1a9bc3e57a06df9de8179e4308333a7e0734cc811ccbd6667
Contents?: true
Size: 798 Bytes
Versions: 13
Compression:
Stored size: 798 Bytes
Contents
module Rails class << self remove_possible_method :root def root @root ||= Pathname.new(File.expand_path('tmp')) end end end module GeneratorsTestHelper def self.included(base) base.class_eval do destination Rails.root setup :prepare_destination end end def copy_routes routes = File.expand_path('test/fixtures/routes.rb') destination = File.join(destination_root, 'config') FileUtils.mkdir_p(destination) FileUtils.cp File.expand_path(routes), File.expand_path(destination) end def copy_engine engine = File.expand_path('test/fixtures/engine.rb') destination = File.join(destination_root, 'lib/tmp') FileUtils.mkdir_p(destination) FileUtils.cp File.expand_path(engine), File.expand_path(destination) end end
Version data entries
13 entries across 13 versions & 1 rubygems