repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/asset_debugging_test.rb
railties/test/application/asset_debugging_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" module ApplicationTests class AssetDebuggingTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include Rack::Test::Methods def setup build_app(initializers: true) app_file "app/assets/...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/url_generation_test.rb
railties/test/application/url_generation_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests class UrlGenerationTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def app Rails.application end test "it works" do require "rails" require "action_controller/railtie"...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/zeitwerk_inflector_test.rb
railties/test/application/zeitwerk_inflector_test.rb
# frozen_string_literal: true require "abstract_unit" class ZeitwerkInflectorTest < ActiveSupport::TestCase INFLECTOR = Rails::Autoloaders::Inflector def reset_overrides INFLECTOR.instance_variable_get(:@overrides).clear end def camelize(basename) INFLECTOR.camelize(basename, nil) end setup do ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/initializers/hooks_test.rb
railties/test/application/initializers/hooks_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests class HooksTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app FileUtils.rm_rf "#{app_path}/config/environments" end def teardown teardown_app end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/initializers/load_path_test.rb
railties/test/application/initializers/load_path_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests class LoadPathTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app FileUtils.rm_rf "#{app_path}/config/environments" end def teardown teardown_app e...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/initializers/i18n_test.rb
railties/test/application/initializers/i18n_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests class I18nTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app FileUtils.rm_rf "#{app_path}/config/environments" require "rails/all" end def teardown ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/initializers/notifications_test.rb
railties/test/application/initializers/notifications_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests class NotificationsTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app end def teardown teardown_app end def instrument(*args, &block) ActiveS...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/initializers/frameworks_test.rb
railties/test/application/initializers/frameworks_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "env_helpers" module ApplicationTests class FrameworksTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include EnvHelpers def setup build_app FileUtils.rm_rf "#{app_path}/config/environments" ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/action_text/installation_integration_test.rb
railties/test/application/action_text/installation_integration_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" module ApplicationTests class InstallationIntegrationTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include Rack::Test::Methods def setup build_app end def teardown teardow...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/rack/logger_test.rb
railties/test/application/rack/logger_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "active_support/log_subscriber/test_helper" require "rack/test" module ApplicationTests module RackTests class LoggerTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include ActiveSupport::LogSubscriber::...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/middleware/session_test.rb
railties/test/application/middleware/session_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" module ApplicationTests class MiddlewareSessionTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include Rack::Test::Methods def setup build_app FileUtils.rm_rf "#{app_path}/config/env...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/middleware/permission_policy_test.rb
railties/test/application/middleware/permission_policy_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests class PermissionPolicyTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app end def teardown teardown_app end test "overriding permissions_policy rais...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/middleware/cookies_test.rb
railties/test/application/middleware/cookies_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" module ApplicationTests class CookiesTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include Rack::Test::Methods def new_app File.expand_path("#{app_path}/../new_app") end def set...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/middleware/static_test.rb
railties/test/application/middleware/static_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" module ApplicationTests class MiddlewareStaticTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include Rack::Test::Methods def setup build_app FileUtils.rm_rf "#{app_path}/config/envi...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/middleware/remote_ip_test.rb
railties/test/application/middleware/remote_ip_test.rb
# frozen_string_literal: true require "ipaddr" require "isolation/abstract_unit" require "active_support/key_generator" module ApplicationTests class RemoteIpTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def remote_ip(env = {}) remote_ip = nil env = Rack::MockRequest....
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/middleware/sendfile_test.rb
railties/test/application/middleware/sendfile_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests class SendfileTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app FileUtils.rm_rf "#{app_path}/config/environments" end def teardown teardown_app e...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/middleware/exceptions_test.rb
railties/test/application/middleware/exceptions_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" module ApplicationTests class MiddlewareExceptionsTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include Rack::Test::Methods def setup build_app end def teardown teardown_a...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/middleware/cache_test.rb
railties/test/application/middleware/cache_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests class CacheTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app require "rack/test" extend Rack::Test::Methods add_to_env_config "production", "config.cac...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/configuration/custom_test.rb
railties/test/application/configuration/custom_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests module ConfigurationTests class CustomTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app reset_environment_configs end def teardown ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/active_storage/validating_service_test.rb
railties/test/application/active_storage/validating_service_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" require "rails-dom-testing" module ApplicationTests class ValidatingServiceTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include Rack::Test::Methods include Rails::Dom::Testing::Assertions ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/active_storage/engine_integration_test.rb
railties/test/application/active_storage/engine_integration_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "env_helpers" module ApplicationTests class ActiveStorageEngineTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include EnvHelpers def setup build_app File.write app_path("Gemfile"), <<~GEMFIL...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/active_storage/uploads_integration_test.rb
railties/test/application/active_storage/uploads_integration_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" require "rails-dom-testing" module ApplicationTests class UploadsIntegrationTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include Rack::Test::Methods include Rails::Dom::Testing::Assertions ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/active_storage/analyzers_integration_test.rb
railties/test/application/active_storage/analyzers_integration_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests class ActiveStorageEngineTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include ActiveJob::TestHelper self.file_fixture_path = "#{RAILS_FRAMEWORK_ROOT}/activestorage/test/fixtures/files" ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/rake/log_test.rb
railties/test/application/rake/log_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests module RakeTests class LogTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app end def teardown teardown_app end test "log:clear ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/rake/migrations_test.rb
railties/test/application/rake/migrations_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests module RakeTests class RakeMigrationsTest < ActiveSupport::TestCase def setup build_app reset_environment_configs add_to_config("config.active_record.timestamped_migrations = false") end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/rake/dbs_setup_test.rb
railties/test/application/rake/dbs_setup_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "env_helpers" module ApplicationTests module RakeTests class RakeDbsSetupTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation, EnvHelpers def setup build_app reset_environment_configs e...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/rake/dbs_schema_test.rb
railties/test/application/rake/dbs_schema_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests module RakeTests class RakeDbsSchemaTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app reset_environment_configs end def teardown te...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/rake/dbs_postgresql_test.rb
railties/test/application/rake/dbs_postgresql_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests module RakeTests class RakeDbsPostgreSQLTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app end def teardown teardown_app end te...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/rake/dbs_test.rb
railties/test/application/rake/dbs_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "env_helpers" module ApplicationTests module RakeTests class RakeDbsTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation, EnvHelpers def setup build_app reset_environment_configs end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/rake/tmp_test.rb
railties/test/application/rake/tmp_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests module RakeTests class TmpTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app end def teardown teardown_app end test "tmp:clear ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/rake/multi_dbs_test.rb
railties/test/application/rake/multi_dbs_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests module RakeTests class RakeMultiDbsTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app(multi_db: true) reset_environment_configs add_to_config("co...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
true
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/application/rake/framework_test.rb
railties/test/application/rake/framework_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests module RakeTests class FrameworkTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app reset_environment_configs end def teardown teardo...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/benchmark_generator_test.rb
railties/test/generators/benchmark_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/benchmark/benchmark_generator" module Rails module Generators class BenchmarkGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper setup do copy_gemfile end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/generator_generator_test.rb
railties/test/generators/generator_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/generator/generator_generator" class GeneratorGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper arguments %w(awesome) def test_generator_skeleton_is_created run_generator %w...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/app_generator_test.rb
railties/test/generators/app_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/app/app_generator" require "generators/shared_generator_tests" DEFAULT_APP_FILES = %w( .dockerignore .env .git .gitattributes .github/dependabot.yml .github/workflows/ci.yml .gitignore .rubocop.ym...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
true
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/generator_test.rb
railties/test/generators/generator_test.rb
# frozen_string_literal: true require "active_support/test_case" require "active_support/testing/autorun" require "env_helpers" require "minitest/mock" require "rails/generators/app_base" module Rails module Generators class GeneratorTest < ActiveSupport::TestCase include EnvHelpers def make_builde...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/migration_generator_test.rb
railties/test/generators/migration_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/migration/migration_generator" require "active_record/migration" class MigrationGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper def setup @old_belongs_to_required_by_default = Ra...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/test_runner_in_engine_test.rb
railties/test/generators/test_runner_in_engine_test.rb
# frozen_string_literal: true require "generators/plugin_test_helper" require "env_helpers" require "plugin_helpers" class TestRunnerInEngineTest < ActiveSupport::TestCase include PluginTestHelper include EnvHelpers include PluginHelpers def setup @destination_root = Dir.mktmpdir("bukkits") generate_...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/integration_test_generator_test.rb
railties/test/generators/integration_test_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/integration_test/integration_test_generator" class IntegrationTestGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper def test_integration_test_skeleton_is_created run_generator %w(i...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/argv_scrubber_test.rb
railties/test/generators/argv_scrubber_test.rb
# frozen_string_literal: true require "active_support/test_case" require "active_support/testing/autorun" require "rails/generators/rails/app/app_generator" require "tempfile" require "fileutils" require "env_helpers" module Rails module Generators class ARGVScrubberTest < ActiveSupport::TestCase # :nodoc: ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/namespaced_generators_test.rb
railties/test/generators/namespaced_generators_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/controller/controller_generator" require "rails/generators/rails/model/model_generator" require "rails/generators/mailer/mailer_generator" require "rails/generators/rails/scaffold/scaffold_generator" require "rail...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/generated_attribute_test.rb
railties/test/generators/generated_attribute_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/generated_attribute" require "rails/generators/base" class GeneratedAttributeTest < Rails::Generators::TestCase include GeneratorsTestHelper def setup @old_belongs_to_required_by_default = Rails.application.co...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/create_migration_test.rb
railties/test/generators/create_migration_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/migration/migration_generator" class CreateMigrationTest < Rails::Generators::TestCase include GeneratorsTestHelper class Migrator < Rails::Generators::MigrationGenerator include Rails::Generators::Migra...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/orm_test.rb
railties/test/generators/orm_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/scaffold_controller/scaffold_controller_generator" require "rails/generators/rails/model/model_generator" # Mock out two ORMs module ORMWithGenerators module Generators class ActiveModel def initializ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/api_app_generator_test.rb
railties/test/generators/api_app_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/app/app_generator" class ApiAppGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper tests Rails::Generators::AppGenerator arguments [destination_root, "--api"] def setup Rails.ap...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/authentication_generator_test.rb
railties/test/generators/authentication_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/app/app_generator" require "rails/generators/rails/authentication/authentication_generator" class AuthenticationGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper def setup FileUtil...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/generators_test_helper.rb
railties/test/generators/generators_test_helper.rb
# frozen_string_literal: true require "abstract_unit" require "active_support/testing/stream" require "active_support/testing/method_call_assertions" require "rails/generators" require "rails/generators/test_case" require "rails/generators/app_base" Rails.application.config.generators.templates = [File.expand_path("....
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/plugin_generator_test.rb
railties/test/generators/plugin_generator_test.rb
# frozen_string_literal: true require "plugin_helpers" require "generators/generators_test_helper" require "rails/generators/rails/plugin/plugin_generator" require "generators/shared_generator_tests" require "rails/engine/updater" DEFAULT_PLUGIN_FILES = %w( .git .github/dependabot.yml .github/workflows/ci.yml ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
true
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/task_generator_test.rb
railties/test/generators/task_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/task/task_generator" class TaskGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper arguments %w(feeds foo bar) def test_task_is_created run_generator assert_file "lib/tasks/fee...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/db_system_change_generator_test.rb
railties/test/generators/db_system_change_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/db/system/change/change_generator" module Rails module Generators module Db module System class ChangeGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/plugin_test_runner_test.rb
railties/test/generators/plugin_test_runner_test.rb
# frozen_string_literal: true require "generators/plugin_test_helper" require "env_helpers" require "plugin_helpers" class PluginTestRunnerTest < ActiveSupport::TestCase include PluginTestHelper include EnvHelpers include PluginHelpers def setup @destination_root = Dir.mktmpdir("bukkits") generate_pl...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/application_record_generator_test.rb
railties/test/generators/application_record_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/application_record/application_record_generator" class ApplicationRecordGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper def test_application_record_skeleton_is_created run_genera...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/plugin_test_helper.rb
railties/test/generators/plugin_test_helper.rb
# frozen_string_literal: true require "abstract_unit" require "tmpdir" module PluginTestHelper def create_test_file(name, pass: true) plugin_file "test/#{name}_test.rb", <<-RUBY require "test_helper" class #{name.camelize}Test < ActiveSupport::TestCase def test_truth puts "#{name....
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/devcontainer_generator_test.rb
railties/test/generators/devcontainer_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/devcontainer/devcontainer_generator" module Rails module Generators class DevcontainerGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper def test_creates_devcontainer_file...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/scaffold_controller_generator_test.rb
railties/test/generators/scaffold_controller_generator_test.rb
# frozen_string_literal: true require "plugin_helpers" require "generators/generators_test_helper" require "rails/generators/rails/scaffold_controller/scaffold_controller_generator" module Unknown module Generators end end class ScaffoldControllerGeneratorTest < Rails::Generators::TestCase include PluginHelper...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/shared_generator_tests.rb
railties/test/generators/shared_generator_tests.rb
# frozen_string_literal: true require "find" require "shellwords" require "env_helpers" # # Tests, setup, and teardown common to the application and plugin generator suites. # module SharedGeneratorTests include EnvHelpers def setup Rails.application = TestApp::Application super Rails::Generators::Ap...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/multi_db_generator_test.rb
railties/test/generators/multi_db_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/active_record/multi_db/multi_db_generator" class MultiDbGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper tests ActiveRecord::Generators::MultiDbGenerator def test_multi_db_skeleton_is_cre...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/helper_generator_test.rb
railties/test/generators/helper_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/helper/helper_generator" ObjectHelper = Class.new AnotherObjectHelperTest = Class.new class HelperGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper arguments %w(admin) def test_help...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/action_mailbox_install_generator_test.rb
railties/test/generators/action_mailbox_install_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "generators/action_mailbox/install/install_generator" class ActionMailbox::Generators::InstallGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper def setup Rails.application = TestApp::Application Rails...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/resource_generator_test.rb
railties/test/generators/resource_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/resource/resource_generator" class ResourceGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper arguments %w(account) def setup super copy_routes Rails::Generators::ModelHel...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/job_generator_test.rb
railties/test/generators/job_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/job/job_generator" class JobGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper def test_job_skeleton_is_created run_generator ["refresh_counters"] assert_file "app/jobs/refresh_counte...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/channel_generator_test.rb
railties/test/generators/channel_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/channel/channel_generator" class ChannelGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper tests Rails::Generators::ChannelGenerator setup do use_with_javascript use_under_importmap...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/scaffold_generator_test.rb
railties/test/generators/scaffold_generator_test.rb
# frozen_string_literal: true require "plugin_helpers" require "generators/generators_test_helper" require "rails/generators/rails/scaffold/scaffold_generator" require "bcrypt" class ScaffoldGeneratorTest < Rails::Generators::TestCase include PluginHelpers include GeneratorsTestHelper arguments %w(product_line ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/model_generator_test.rb
railties/test/generators/model_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/model/model_generator" class ModelGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper arguments %w(Account name:string age:integer) def setup super Rails::Generators::ModelHelp...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/hook_generator_test.rb
railties/test/generators/hook_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" class HookGeneratorTest < ActiveSupport::TestCase class GeneratorWithHook < Rails::Generators::Base hook_for(:test_framework) end class GeneratorWithoutHook < GeneratorWithHook remove_hook_for(:test_framework) end def test_h...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/actions_test.rb
railties/test/generators/actions_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/app/app_generator" require "env_helpers" class ActionsTest < Rails::Generators::TestCase include GeneratorsTestHelper include EnvHelpers tests Rails::Generators::AppGenerator arguments [destination_root]...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/system_test_generator_test.rb
railties/test/generators/system_test_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/system_test/system_test_generator" class SystemTestGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper arguments %w(user) def test_system_test_skeleton_is_created run_generator ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/mailer_generator_test.rb
railties/test/generators/mailer_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/mailer/mailer_generator" class MailerGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper arguments %w(notifier foo bar) def test_mailer_skeleton_is_created run_generator assert_file ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/controller_generator_test.rb
railties/test/generators/controller_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/controller/controller_generator" class ControllerGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper arguments %w(Account foo bar) setup :copy_routes def test_help_does_not_show_inv...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/action_text_install_generator_test.rb
railties/test/generators/action_text_install_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "generators/action_text/install/install_generator" class ActionText::Generators::InstallGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper setup do Rails.application = Rails.application.class Rails.app...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/named_base_test.rb
railties/test/generators/named_base_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/scaffold_controller/scaffold_controller_generator" class NamedBaseTest < Rails::Generators::TestCase include GeneratorsTestHelper tests Rails::Generators::ScaffoldControllerGenerator def test_named_generat...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/generators/script_generator_test.rb
railties/test/generators/script_generator_test.rb
# frozen_string_literal: true require "generators/generators_test_helper" require "rails/generators/rails/script/script_generator" module Rails module Generators class ScriptGeneratorTest < Rails::Generators::TestCase include GeneratorsTestHelper def test_generate_script run_generator ["my_...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/railties/generators_test.rb
railties/test/railties/generators_test.rb
# frozen_string_literal: true RAILS_ISOLATED_ENGINE = true require "isolation/abstract_unit" require "generators/generators_test_helper" require "rails/generators/test_case" module RailtiesTests class GeneratorTest < Rails::Generators::TestCase include ActiveSupport::Testing::Isolation def destination_roo...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/railties/mounted_engine_test.rb
railties/test/railties/mounted_engine_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module ApplicationTests class ApplicationRoutingTest < ActiveSupport::TestCase require "rack/test" include Rack::Test::Methods include ActiveSupport::Testing::Isolation def setup build_app add_to_config("config.action_disp...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/railties/railtie_test.rb
railties/test/railties/railtie_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" module RailtiesTest class RailtieTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation def setup build_app reset_environment_configs require "rails/all" end def teardown teardown_app end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/railties/engine_test.rb
railties/test/railties/engine_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "stringio" require "rack/test" module RailtiesTest class EngineTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation include Rack::Test::Methods def setup build_app({ multi_db: true }) routes <<~'RUB...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
true
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/test_unit/test_parser_test.rb
railties/test/test_unit/test_parser_test.rb
# frozen_string_literal: true require "active_support/deprecator" require "active_support/test_case" require "active_support/testing/autorun" require "rails/test_unit/test_parser" class TestParserTestFixture < ActiveSupport::TestCase def test_method assert true assert true end def test_oneline; assert...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/test_unit/reporter_test.rb
railties/test/test_unit/reporter_test.rb
# frozen_string_literal: true require "abstract_unit" require "rails/test_unit/reporter" require "minitest/mock" class TestUnitReporterTest < ActiveSupport::TestCase class ExampleTest < Minitest::Test def woot; end end setup do @output = StringIO.new @reporter = Rails::TestUnitReporter.new @output,...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/engine/commands_test.rb
railties/test/engine/commands_test.rb
# frozen_string_literal: true require "abstract_unit" require "console_helpers" require "plugin_helpers" require "net/http" class Rails::Engine::CommandsTest < ActiveSupport::TestCase include ConsoleHelpers include PluginHelpers def setup @destination_root = Dir.mktmpdir("bukkits") generate_plugin("#{@...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/engine/lazy_route_set_test.rb
railties/test/engine/lazy_route_set_test.rb
# frozen_string_literal: true require "isolation/abstract_unit" require "rack/test" module Rails class Engine class LazyRouteSetTest < ActiveSupport::TestCase include ActiveSupport::Testing::Isolation setup :build_app teardown :teardown_app class UsersController < ActionController::Bas...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/test/engine/test_test.rb
railties/test/engine/test_test.rb
# frozen_string_literal: true require "abstract_unit" require "plugin_helpers" class Rails::Engine::TestTest < ActiveSupport::TestCase include PluginHelpers setup do @destination_root = Dir.mktmpdir("bukkits") generate_plugin("#{@destination_root}/bukkits", "--mountable") end teardown do FileUti...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails.rb
railties/lib/rails.rb
# frozen_string_literal: true require "pathname" require "active_support" require "active_support/rails" require "active_support/core_ext/kernel/reporting" require "active_support/core_ext/array/extract_options" require "rails/version" require "rails/deprecator" require "rails/application" require "rails/backtrace_c...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/minitest/rails_plugin.rb
railties/lib/minitest/rails_plugin.rb
# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" require "rails/test_unit/reporter" require "rails/test_unit/runner" module Minitest class BacktraceFilterWithFallback def initialize(preferred, fallback) @preferred = preferred @fallback = fallback end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/command.rb
railties/lib/rails/command.rb
# frozen_string_literal: true require "active_support" require "active_support/rails" require "active_support/core_ext/enumerable" require "rails/deprecator" require "thor" module Rails module Command extend ActiveSupport::Autoload autoload :Behavior autoload :Base class CorrectableNameError < St...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/version.rb
railties/lib/rails/version.rb
# frozen_string_literal: true require_relative "gem_version" module Rails # Returns the currently loaded version of \Rails as a string. def self.version VERSION::STRING end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/application.rb
railties/lib/rails/application.rb
# frozen_string_literal: true require "yaml" require "active_support/core_ext/hash/keys" require "active_support/key_generator" require "active_support/message_verifiers" require "active_support/combined_configuration" require "active_support/env_configuration" require "active_support/dot_env_configuration" require "a...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/code_statistics.rb
railties/lib/rails/code_statistics.rb
# frozen_string_literal: true require "rails/code_statistics_calculator" require "active_support/core_ext/enumerable" module Rails class CodeStatistics DIRECTORIES = [ %w(Controllers app/controllers), %w(Helpers app/helpers), %w(Jobs app/jobs), %w(Models ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/zeitwerk_checker.rb
railties/lib/rails/zeitwerk_checker.rb
# frozen_string_literal: true # The actual (private) implementation of the Rake task zeitwerk:check. class Rails::ZeitwerkChecker # :nodoc: def self.check Zeitwerk::Loader.eager_load_all autoloaded = ActiveSupport::Dependencies.autoload_paths + ActiveSupport::Dependencies.autoload_once_paths eager_loade...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/test_help.rb
railties/lib/rails/test_help.rb
# frozen_string_literal: true # :enddoc: # Make double-sure the RAILS_ENV is not set to production, # so fixtures aren't loaded into that environment abort("Abort testing: Your Rails environment is running in production mode!") if Rails.env.production? require "active_support/test_case" require "rails/generators/tes...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/generators.rb
railties/lib/rails/generators.rb
# frozen_string_literal: true require "thor/group" require "rails/command" require "active_support/core_ext/array/extract_options" require "active_support/core_ext/enumerable" require "active_support/core_ext/hash/deep_merge" require "active_support/core_ext/module/attribute_accessors" require "active_support/core_ex...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/mailers_controller.rb
railties/lib/rails/mailers_controller.rb
# frozen_string_literal: true require "rails/application_controller" require "active_support/core_ext/enumerable" class Rails::MailersController < Rails::ApplicationController # :nodoc: prepend_view_path ActionDispatch::DebugView::RESCUES_TEMPLATE_PATHS around_action :set_locale, only: [:preview, :download] be...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/welcome_controller.rb
railties/lib/rails/welcome_controller.rb
# frozen_string_literal: true require "rails/application_controller" class Rails::WelcomeController < Rails::ApplicationController # :nodoc: skip_forgery_protection layout false def index end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/rack.rb
railties/lib/rails/rack.rb
# frozen_string_literal: true module Rails module Rack autoload :Logger, "rails/rack/logger" autoload :SilenceRequest, "rails/rack/silence_request" end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/dev_caching.rb
railties/lib/rails/dev_caching.rb
# frozen_string_literal: true require "fileutils" module Rails module DevCaching # :nodoc: class << self FILE = "tmp/caching-dev.txt" def enable_by_file FileUtils.mkdir_p("tmp") if File.exist?(FILE) delete_cache_file puts "Action Controller caching disabled for ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/structured_event_subscriber.rb
railties/lib/rails/structured_event_subscriber.rb
# frozen_string_literal: true require "active_support/structured_event_subscriber" module Rails class StructuredEventSubscriber < ActiveSupport::StructuredEventSubscriber # :nodoc: def deprecation(event) emit_event("rails.deprecation", message: event.payload[:message], callstack: event.pay...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/railtie.rb
railties/lib/rails/railtie.rb
# frozen_string_literal: true require "rails/initializable" require "active_support/descendants_tracker" require "active_support/inflector" require "active_support/core_ext/module/introspection" module Rails # +Rails::Railtie+ is the core of the \Rails framework and provides # several hooks to extend \Rails and/o...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/paths.rb
railties/lib/rails/paths.rb
# frozen_string_literal: true require "pathname" module Rails module Paths # This object is an extended hash that behaves as root of the Rails::Paths system. # It allows you to collect information about how you want to structure your application # paths through a Hash-like \API. It requires you to give ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/initializable.rb
railties/lib/rails/initializable.rb
# frozen_string_literal: true require "tsort" module Rails module Initializable def self.included(base) # :nodoc: base.extend ClassMethods end class Initializer attr_reader :name, :block, :before, :after def initialize(name, context, before:, after:, group: nil, &block) @grou...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/info.rb
railties/lib/rails/info.rb
# frozen_string_literal: true require "active_support/core_ext/erb/util" module Rails # This module helps build the runtime properties that are displayed in # Rails::InfoController responses. These include the active \Rails version, # Ruby version, Rack version, and so on. module Info mattr_accessor :prop...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/railties/lib/rails/code_statistics_calculator.rb
railties/lib/rails/code_statistics_calculator.rb
# frozen_string_literal: true module Rails class CodeStatisticsCalculator # :nodoc: attr_reader :lines, :code_lines, :classes, :methods PATTERNS = { rb: { line_comment: /^\s*#/, begin_block_comment: /^=begin/, end_block_comment: /^=end/, class: /^\s*class\s+[_A-Z]/, ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false