Skip to content

Instantly share code, notes, and snippets.

@amatsuda
Created August 26, 2021 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amatsuda/7908502c64b8eea7c483720d37375df7 to your computer and use it in GitHub Desktop.
Save amatsuda/7908502c64b8eea7c483720d37375df7 to your computer and use it in GitHub Desktop.
Rails 6.1 + triple nested sub_test_case on test-unit-rails
# frozen_string_literal: true
require 'bundler/inline'
gemfile(true) do
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem 'rails', github: 'rails/rails', branch: 'main'
gem 'test-unit-rails'
end
require 'action_controller/railtie'
class TestApp < Rails::Application
secrets.secret_key_base = config.root = __dir__
Rails.logger = config.logger = Logger.new($stdout)
end
require 'test/unit/rails/test_help'
class BugTest < ActionView::TestCase
sub_test_case 'foo' do
sub_test_case 'bar' do
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment