This is a refactoring exercise available for many languages in this repo. I had seen it used in talks by Sandi Metz and Jim Weirich, and it looked like a fun way to practice some refactoring.
I used only the ruby bits. See Refactor PR for comparison to original. I added a gemfile with Ruby LSP, Rubocop, and Reek for IDE support while refactoring.
Ensure you have RSpec installed
bundle
OR gem install rspec
rspec gilded_rose_spec.rb
For e.g. 30 days:
ruby texttest_fixture.rb 30
The output should match the comment in that file (from original repo that uses TextTest).