How To Install rubygem-timecop on Fedora 36

In this tutorial we learn how to install rubygem-timecop in Fedora 36. rubygem-timecop is Provides a unified method to mock Time.now, Date.today in a single call

Introduction

In this tutorial we learn how to install rubygem-timecop on Fedora 36.

What is rubygem-timecop

A gem providing “time travel” and “time freezing” capabilities, making it dead simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.

We can use yum or dnf to install rubygem-timecop on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install rubygem-timecop.

Install rubygem-timecop on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install rubygem-timecop using dnf by running the following command:

sudo dnf -y install rubygem-timecop

Install rubygem-timecop on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install rubygem-timecop using yum by running the following command:

sudo yum -y install rubygem-timecop

How To Uninstall rubygem-timecop on Fedora 36

To uninstall only the rubygem-timecop package we can use the following command:

sudo dnf remove rubygem-timecop

rubygem-timecop Package Contents on Fedora 36

/usr/share/gems/gems/timecop-0.9.4
/usr/share/gems/gems/timecop-0.9.4/LICENSE
/usr/share/gems/gems/timecop-0.9.4/lib
/usr/share/gems/gems/timecop-0.9.4/lib/timecop
/usr/share/gems/gems/timecop-0.9.4/lib/timecop.rb
/usr/share/gems/gems/timecop-0.9.4/lib/timecop/time_extensions.rb
/usr/share/gems/gems/timecop-0.9.4/lib/timecop/time_stack_item.rb
/usr/share/gems/gems/timecop-0.9.4/lib/timecop/timecop.rb
/usr/share/gems/gems/timecop-0.9.4/lib/timecop/version.rb
/usr/share/gems/specifications/timecop-0.9.4.gemspec

References

Summary

In this tutorial we learn how to install rubygem-timecop on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).