Misc Changes
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package solutions.tretter.githugandroid
|
||||
|
||||
/**
|
||||
* Port of the upstream ruby-githug `merge` level.
|
||||
*
|
||||
* Setup documents the repository shape the learner explores. Evaluation is kept
|
||||
* state-based whenever the exercise changes repository objects; answer-only
|
||||
* levels intentionally validate the answer entered at the prompt.
|
||||
*/
|
||||
internal fun mergeLevel(): Level = level(
|
||||
id = "merge",
|
||||
title = "Merge",
|
||||
description = "We have a file in the branch 'feature'. Let's merge it with the master branch.",
|
||||
hints = listOf("You want to research the `git merge` command."),
|
||||
commandSuggestions = listOf("git merge feature"),
|
||||
setup = { RepoState(initialized = true, files = listOf(GitFile("file1", tracked = true)), branches = mapOf("master" to 1, "feature" to 2)) },
|
||||
validator = repoPredicate { repo -> repo.files.any { it.name == "file2" && it.tracked } },
|
||||
testCases = listOf(
|
||||
levelTestCase("merge feature", "git merge feature"),
|
||||
),
|
||||
)
|
||||
Reference in New Issue
Block a user