<commit_before>require 'assert'
require 'romo/dassets'

require 'dassets'
require 'dassets-sass'

module Romo::Dassets

  class UnitTests < Assert::Context
    desc "Romo::Dassets"
    subject{ Romo::Dassets }

    should have_imeths :configure!, :reset!

    should "configure Romo with Dassets" do
      subject.configure!

      source = Dassets.config.sources.detect do |source|
        source.path == Romo.gem_assets_path.to_s
      end
      assert source
      assert_instance_of Dassets::Sass::Engine, source.engines["scss"]

      exp_css_sources = [
        'css/romo/normalize.css',
        'css/romo/base.css',
        'css/romo/colors.css',
        'css/romo/forms.css',
        'css/romo/buttons.css',
        'css/romo/labels.css',<commit_msg>(hotfix) better test setup/teardown for Dassets tests<commit_after>require 'assert'
require 'romo/dassets'

require 'dassets'
require 'dassets-sass'

module Romo::Dassets

  class UnitTests < Assert::Context
    desc "Romo::Dassets"
    setup do
      Romo::Dassets.reset!
    end
    teardown do
      Romo::Dassets.reset!
    end
    subject{ Romo::Dassets }

    should have_imeths :configure!, :reset!

    should "configure Romo with Dassets" do
      subject.configure!

      source = Dassets.config.sources.detect do |source|
        source.path == Romo.gem_assets_path.to_s
      end
      assert source
      assert_instance_of Dassets::Sass::Engine, source.engines["scss"]

      exp_css_sources = [
        'css/romo/normalize.css',
        'css/romo/base.css',
        'css/romo/colors.css',
        'css/romo/forms.css',
        'css/romo/buttons.css',
        'css/romo/labels.css',
{'fraction_non_alphanumeric': 0.1202416918429003, 'fraction_numerical': 0.0, 'mean_word_length': 2.7636363636363637, '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': '4908571', 'n_tokens_mistral': 566, 'n_tokens_neox': 553, 'n_words': 107}