Skip to content

[Patch] Failing test spec/auth_token_file_spec.rb with Ruby 2.7: NameError: uninitialized constant RSpec::Support::Differ #313

@dleidert

Description

@dleidert

The test spec/auth_token_file_spec.rb is failing with these errors with Ruby 2.7:

Failures:

  1) Gist::AuthTokenFile::filename with default GITHUB_URL is ~/.gist
     Failure/Error: subject.filename.should be filename

     RuntimeError:
       CRITICAL: RUBYGEMS_ACTIVATION_MONITOR.owned?: before false -> after true
     # ./spec/auth_token_file_spec.rb:14:in `block (4 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # NameError:
     #   uninitialized constant RSpec::Support::Differ
     #   ./spec/auth_token_file_spec.rb:14:in `block (4 levels) in <top (required)>'

  2) Gist::AuthTokenFile::filename with custom GITHUB_URL is ~/.gist.{custom_github_url}
     Failure/Error: subject.filename.should be filename

     NameError:
       uninitialized constant RSpec::Support::Differ
     # ./spec/auth_token_file_spec.rb:26:in `block (4 levels) in <top (required)>'

The patch is fairly simple:
https://salsa.debian.org/ruby-team/gist/-/blob/master/debian/patches/mochafix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions