Sha256: ca4b9acc1d4f0281d62189ef404820d003ba904aec73cc40d7b41c16ec438aba
Contents?: true
Size: 707 Bytes
Versions: 10
Compression:
Stored size: 707 Bytes
Contents
require "generators/mini_test" module MiniTest module Generators class RouteGenerator < ::Rails::Generators::Base class_option :spec, :type => :boolean, :default => false, :desc => "Use MiniTest::Spec DSL" desc <<DESC Description: Creates a route test. DESC def self.source_root @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates')) end def create_test_files if options[:spec] template "route_spec.rb", File.join("test", "routes", "route_test.rb") else template "route_test.rb", File.join("test", "routes", "route_test.rb") end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems