Read more

Aruba: Stubbing binaries

Dominik Schöler
November 18, 2016Software engineer at makandra GmbH

When testing your command line application with Aruba Show archive.org snapshot , you might need to stub out other binaries you don't want to be invoked by your test.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

Aruba Doubles Show archive.org snapshot is a library that was built for this purpose. It is not actively maintained, but works with the little fix below.

Installation

Install the gem as instructed by its README, then put this Before block somewhere into features/support:

Before do
  ArubaDoubles::Double.setup
  prepend_environment_variable 'PATH', ArubaDoubles::Double.bindir + ':'
end

This is required because the way Aruba Doubles patches the PATH environment variable is not supported Show archive.org snapshot (i.e. not noticed) by modern Arubas. By using Aruba's offical API method prepend_environment_variable, everything is in place.

Posted by Dominik Schöler to makandra dev (2016-11-18 10:27)