How To Install hspec-discover on Kali Linux
Introduction
In this tutorial we learn how to install hspec-discover on Kali Linux.
What is hspec-discover
hspec-discover is:
It is a useful convention to have one spec file for each source file. That way it is straightforward to find the corresponding spec for a given piece of code. But it requires error prone, and neither challenging nor interesting boiler plate code. So it should be automated. Hspec provides a solution for that. It makes creative use of GHC’s support for custom preprocessors. The developer only has to create a test driver that contains a single line.
A complete example is at https://github.com/hspec/hspec-example.
There are three methods to install hspec-discover on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.
Install hspec-discover Using apt-get
Update apt database with apt-get using the following command.
sudo apt-get updateAfter updating apt database, We can install hspec-discover using apt-get by running the following command:
sudo apt-get -y install hspec-discoverInstall hspec-discover Using apt
Update apt database with apt using the following command.
sudo apt updateAfter updating apt database, We can install hspec-discover using apt by running the following command:
sudo apt -y install hspec-discoverInstall hspec-discover Using aptitude
If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.
sudo aptitude updateAfter updating apt database, We can install hspec-discover using aptitude by running the following command:
sudo aptitude -y install hspec-discoverHow To Uninstall hspec-discover on Kali Linux
To uninstall only the hspec-discover package we can use the following command:
sudo apt-get remove hspec-discoverUninstall hspec-discover And Its Dependencies
To uninstall hspec-discover and its dependencies that are no longer needed by Kali Linux, we can use the command below:
sudo apt-get -y autoremove hspec-discoverRemove hspec-discover Configurations and Data
To remove hspec-discover configuration and data from Kali Linux we can use the following command:
sudo apt-get -y purge hspec-discoverRemove hspec-discover configuration, data, and all of its dependencies
We can use the following command to remove hspec-discover configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge hspec-discoverDependencies
hspec-discover have the following dependencies:
References
Summary
In this tutorial we learn how to install hspec-discover package on Kali Linux using different package management tools: apt, apt-get and aptitude.