<commit_before>require "test_helper"
require "generators/godmin/resource/resource_generator"

module Godmin
  class ResourceGeneratorTest < ::Rails::Generators::TestCase
    tests ResourceGenerator
    destination File.expand_path("../../tmp", __FILE__)
    setup :prepare_destination

    def test_resource_generator_in_standalone_install
      system "cd #{destination_root} && rails new . --skip-test --skip-spring --skip-bundle --skip-git --quiet"
      system "cd #{destination_root} && bin/rails generate godmin:install --quiet"<commit_msg>Prevent intermittent test failures with teardown<commit_after>require "test_helper"
require "generators/godmin/resource/resource_generator"

module Godmin
  class ResourceGeneratorTest < ::Rails::Generators::TestCase
    tests ResourceGenerator
    destination File.expand_path("../../tmp", __FILE__)
    setup :prepare_destination
    teardown :prepare_destination

    def test_resource_generator_in_standalone_install
      system "cd #{destination_root} && rails new . --skip-test --skip-spring --skip-bundle --skip-git --quiet"
      system "cd #{destination_root} && bin/rails generate godmin:install --quiet"
{'fraction_non_alphanumeric': 0.10938845822566753, 'fraction_numerical': 0.0, 'mean_word_length': 4.586538461538462, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '358572', 'n_tokens_mistral': 322, 'n_tokens_neox': 309, 'n_words': 76}