require 'bundler/setup'

require 'minitest/autorun'
require 'mocha'
require 'mocha/mini_test'

# Configure Rails
ENV['RAILS_ENV'] = 'test'

require 'active_support'
require 'active_support/core_ext/string/strip'
require 'action_controller'
require 'action_dispatch/middleware/flash'

$:.unshift File.expand_path('../../lib', __FILE__)
require 'has_scope'

HasScope::Routes = ActionDispatch::Routing::RouteSet.new
HasScope::Routes.draw do
  get '/:controller(/:action(/:id))'
end

class ApplicationController < ActionController::Base
  include HasScope::Routes.url_helpers
end

class ActiveSupport::TestCase
  self.test_order = :random if respond_to?(:test_order=)

  setup do
    @routes = HasScope::Routes
  end
end

require 'bundler/setup'

require 'minitest/autorun'
require 'mocha'
require 'mocha/mini_test'

# Configure Rails
ENV['RAILS_ENV'] = 'test'

require 'active_support'
require 'active_support/core_ext/string/strip'
require 'action_controller'
require 'action_dispatch/middleware/flash'

$:.unshift File.expand_path('../../lib', __FILE__)
require 'has_scope'

HasScope::Routes = ActionDispatch::Routing::RouteSet.new
HasScope::Routes.draw do
  resources :trees, only: %i[index new edit show]
end

class ApplicationController < ActionController::Base
  include HasScope::Routes.url_helpers
end

class ActiveSupport::TestCase
  self.test_order = :random if respond_to?(:test_order=)

  setup do
    @routes = HasScope::Routes
  end
end

Declare specific routes to get rid of deprecation warning
Declare specific routes to get rid of deprecation warning

Dynamic :controller/:action route segments are deprecated in Rails:

    DEPRECATION WARNING: Using a dynamic :controller segment in a route
    is deprecated and will be removed in Rails 6.1.

    DEPRECATION WARNING: Using a dynamic :action segment in a route
    is deprecated and will be removed in Rails 6.1.
