<commit_before>package kaizen.plugins

import org.gradle.api.Project

class BundleWithTests extends PluginSpecification {

	def bundle = projectWithName('bundle')
	def p1 = subProjectWithName('p1')
	def p1Tests = subProjectWithName('p1.Tests')
	def p2 = subProjectWithName('p2')
	def p2Tests = subProjectWithName('p2.Tests')

	@Override
	void setup() {
		bundle.apply plugin: BundlePlugin
	}

	def 'editor configuration depends on every sub project except tests'() {
		expect:
		projectsDependedUponBy('editor') == [p1, p2]
	}

	def 'test configuration depends on every test sub project'() {
		expect:
		projectsDependedUponBy('tests') == [p1Tests, p2Tests]
	}

	Object[] projectsDependedUponBy(String config) {
		bundle.configurations[config].dependencies.collect { it.dependencyProject }.toArray()
	}

	Project subProjectWithName(String name) {
		projectBuilderWithName(name).withParent(bundle).build()
	}
}
<commit_msg>toArray is unnecessary<commit_after>package kaizen.plugins

import org.gradle.api.Project

class BundleWithTests extends PluginSpecification {

	def bundle = projectWithName('bundle')
	def p1 = subProjectWithName('p1')
	def p1Tests = subProjectWithName('p1.Tests')
	def p2 = subProjectWithName('p2')
	def p2Tests = subProjectWithName('p2.Tests')

	@Override
	void setup() {
		bundle.apply plugin: BundlePlugin
	}

	def 'editor configuration depends on every sub project except tests'() {
		expect:
		projectsDependedUponBy('editor') == [p1, p2]
	}

	def 'test configuration depends on every test sub project'() {
		expect:
		projectsDependedUponBy('tests') == [p1Tests, p2Tests]
	}

	Object[] projectsDependedUponBy(String config) {
		bundle.configurations[config].dependencies.collect { it.dependencyProject }
	}

	Project subProjectWithName(String name) {
		projectBuilderWithName(name).withParent(bundle).build()
	}
}

{'fraction_non_alphanumeric': 0.1112316874660879, 'fraction_numerical': 0.013022246337493217, 'mean_word_length': 5.633093525179856, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6715812', 'n_tokens_mistral': 614, 'n_tokens_neox': 569, 'n_words': 133}