<commit_before>(ns shuppet.unit.core-shuppet
  (:require  [slingshot.slingshot :refer [try+ throw+]])
  (:use [shuppet.core-shuppet]
        [midje.sweet]))
<commit_msg>test shuppet customization<commit_after>(ns shuppet.unit.core-shuppet
  (:require  [slingshot.slingshot :refer [try+ throw+]])
  (:use [shuppet.core-shuppet]
        [midje.sweet]))

(deftype TestAppNames []
  ApplicationNames
  (list-names
    [_]
    ["test-app"]))

(deftype TestConfig []
  Configuration
  (as-string
    [_ environment name]
    "this is a test config"))

(def configuration @#'shuppet.core-shuppet/configuration)

(fact-group :unit
            (fact "app list can be customized"
                  (binding [*application-names*  (TestAppNames.)]
                    (app-names) => ["test-app"]))

            (fact "configuration source can be customized"
                  (binding [*configuration*  (TestConfig.)]
                    (configuration ..env.. ..name..) => "this is a test config")))

{'fraction_non_alphanumeric': 0.14762386248736098, 'fraction_numerical': 0.0, 'mean_word_length': 2.680297397769517, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4992581', 'n_tokens_mistral': 331, 'n_tokens_neox': 314, 'n_words': 71}