GildedRose-Refactoring-Kata/scala
2025-10-06 16:38:00 +02:00
..
project * ignored old approval test 2025-10-04 21:19:41 +02:00
src suppressed sbt specific output 2025-10-06 15:51:58 +02:00
.gitignore suppressed sbt specific output 2025-10-06 15:51:58 +02:00
build.sbt housekeeping 2025-10-06 10:13:53 +02:00
README.md Updated README.txt 2025-10-06 10:03:15 +02:00
texttest_rig.py suppressed sbt specific output 2025-10-06 15:51:58 +02:00

Gilded Rose starting position in Scala 3 scalatest

Build the project

sbt compile

Run the Gilded Rose Command-Line program

For e.g. 10 days:

sbt "run 10"

Run all the unit tests

sbt test

Run approval tests

The approval test can be found in the src/test/scala/GildedRoseApprovalTest.scala. It uses the approval test framework from https://github.com/approvals/ApprovalTests.Java.

The initial run will be a failing test and suggests an output to accept as the first approved version. Each subsequent run of the test will succeed until the output from the test changes.

To approve a new version, simply accept some or all diffs between the existing approved files and the newly generated output.

Approval tests are part of the test suite triggered by "sbt test".

sbt test

Run texttest version of approval tests

To run the texttest version, first edit the texttest configuration file. It contains to sections for scala that need to be uncommented.

  • the executable and interpreter lines to run texttest_rig.py to trigger an sbt run
  • the four lines in the run_dependent_text section to ignore sbt's info and success lines in the output.

Be aware that running the texttest version is somewhat slow since starting sbt takes some time.