How To Install ruby-minitest on Ubuntu 20.04

In this tutorial we learn how to install ruby-minitest on Ubuntu 20.04. ruby-minitest is Ruby test tools supporting TDD, BDD, mocking, and benchmarking

Introduction

In this tutorial we learn how to install ruby-minitest on Ubuntu 20.04.

What is ruby-minitest

ruby-minitest is:

minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking.

minitest/unit is a small and incredibly fast unit testing framework. It provides a rich set of assertions to make your tests clean and readable.

minitest/spec is a functionally complete spec engine. It hooks onto minitest/unit and seamlessly bridges test assertions over to spec expectations.

minitest/benchmark is an awesome way to assert the performance of your algorithms in a repeatable manner. Now you can assert that your newb co-worker doesn’t replace your linear algorithm with an exponential one!

minitest/mock by Steven Baker, is a beautifully tiny mock object framework.

minitest/pride shows pride in testing and adds coloring to your test output.

minitest/unit is meant to have a clean implementation for language implementors that need a minimal set of methods to bootstrap a working test suite. For example, there is no magic involved for test-case discovery. Task: ubuntu-budgie-desktop Ruby-Versions: all

There are three methods to install ruby-minitest on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install ruby-minitest Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install ruby-minitest using apt-get by running the following command:

sudo apt-get -y install ruby-minitest

Install ruby-minitest Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install ruby-minitest using apt by running the following command:

sudo apt -y install ruby-minitest

Install ruby-minitest Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install ruby-minitest using aptitude by running the following command:

sudo aptitude -y install ruby-minitest

How To Uninstall ruby-minitest on Ubuntu 20.04

To uninstall only the ruby-minitest package we can use the following command:

sudo apt-get remove ruby-minitest

Uninstall ruby-minitest And Its Dependencies

To uninstall ruby-minitest and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove ruby-minitest

Remove ruby-minitest Configurations and Data

To remove ruby-minitest configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge ruby-minitest

Remove ruby-minitest configuration, data, and all of its dependencies

We can use the following command to remove ruby-minitest configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge ruby-minitest

References

Summary

In this tutorial we learn how to install ruby-minitest package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.