Subject: Re: [bug#34217] [PATCH 11/11] gnu: Add ruby-cucumber and ruby-aruba.

From: Christopher Baines <[email-masked]>
Date: Fri, 08 Feb 2019 18:46:02 +0000

swedebugia <[email-masked]> writes:

> On 2019-01-30 17:22, swedebugia wrote:
>> On 2019-01-30 17:11, swedebugia wrote:
>>> On 2019-01-30 13:56, Ricardo Wurmus wrote:
>>>>
>>>> Hi swedebugia,
>>>>
>>>>> On 2019-01-27 12:49, Christopher Baines wrote:
>>>>>> These packages are mutually dependant, so I've put them in one commit.
>>>>>>
>>>>>> * gnu/packages/ruby.scm (ruby-aruba, ruby-cucumber): New variables.
> snip
>
>>> I don't know ruby at all so I might not be the best qualified to
>>> investigate this. :/
>
> I decided to try out latest master, worked a little on it and now it
> builds without failure! :D
>
> I'm unsure what revision number we usually start on, please correct if
> necessary.
>
> (define-public ruby-aruba
>   ;; Take commit from latest master to avoid test failures
>
>
>
>   (let ((commit "688ad050f48990bfac127eaf529a828a0139d85f")
>         (revision "1"))

...

> Could you update the patch Christopher?

Thanks for trying this out. Today I tried updating to 0.14.8, and
working around the test failures.

I've added the following phase, which works around the test failures.

  (add-after 'unpack 'patch
    (lambda _
      (substitute* "spec/aruba/api_spec.rb"
        ;; This resolves some errors in the specs
        ;;
        ;; undefined method `parse' for Time:Class
        (("require 'spec_helper'")
         "require 'spec_helper'\nrequire 'time'"))
      ;; Avoid shebang issues in this spec file
      (substitute* "spec/aruba/matchers/command_spec.rb"
        (("/usr/bin/env bash")
         (which "bash")))
      #t))

The first change, adding require 'time' is present on the upstream
master branch [1], which explains why this helped.

1: https://github.com/cucumber/aruba/commit/7d11cad400bbbfd1ec039e39062f7f2576d970f6#diff-b014353d9f47f067ea8e078d34a1826b

As for the second set of test failures, the ones relating to "@cmd", I
think that's down to the spec's using "/usr/bin/env bash". I'm unsure
why using the master branch would have fixed this.

Even though sticking with 0.14.8 requires patching the tests, I'm
inclined to stick with patching this release, rather than using the
master branch as the source, as I think using upstream releases is
preferable.

Anyway, thanks for your help in looking in to this :)

Chris