Sha256: 5a1d9388a87f89f9289d5b34f184d662ee7d852f5a15daa451da141627767977
Contents?: true
Size: 688 Bytes
Versions: 4
Compression:
Stored size: 688 Bytes
Contents
# frozen_string_literal: true require "bundler/gem_tasks" require "rake/testtask" Bundler.setup load "rails/tasks/routes.rake" Rake::TestTask.new(:test) do |t| t.libs << "test" t.libs << "lib" t.test_files = FileList["test/**/*_test.rb"] end namespace :test do desc 'Show routes for tests' task :routes do Dir["#{__dir__}/test/support/**/*.rb"].sort.each { |f| require f } require 'action_dispatch/routing/inspector' all_routes = Rails.application.routes.routes inspector = ActionDispatch::Routing::RoutesInspector.new(all_routes) puts inspector.format(ActionDispatch::Routing::ConsoleFormatter.new, ENV['CONTROLLER']) end end task :default => :test
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ts_routes-1.0.3 | Rakefile |
ts_routes-1.0.2 | Rakefile |
ts_routes-1.0.1 | Rakefile |
ts_routes-1.0.0 | Rakefile |