Skip to content

'parse raises an error for unknown switches' test failure #814

@apteryks

Description

@apteryks

Hello,

Updating this package to 1.2.1 in GNU Guix, I see the following test failure:

starting phase `check'
......................................................................................................................................................../tmp/guix-build-ruby-thor-1.2.1.drv-0/source/spec/actions/inject_into_file_spec.rb:155: warning: setting Encoding.default_external
/tmp/guix-build-ruby-thor-1.2.1.drv-0/source/spec/actions/inject_into_file_spec.rb:159: warning: setting Encoding.default_external
......................................................................................................................................................................................................................................................................................................F..................................................................................................................................................................................................................................................................................................................................................................

Failures:

  1) Thor::Options#parse raises an error for unknown switches
     Failure/Error: expect { check_unknown! }.to raise_error(Thor::UnknownArgumentError, expected)

       expected Thor::UnknownArgumentError with "Unknown switches \"--baz\"\nDid you mean?  \"--bar\"", got #<Thor::UnknownArgumentError: Unknown switches "--baz"
       Did you mean?  "--bar"> with backtrace:
         # ./lib/thor/parser/options.rb:146:in `check_unknown!'
         # ./spec/parser/options_spec.rb:17:in `check_unknown!'
         # ./spec/parser/options_spec.rb:119:in `block (4 levels) in <top (required)>'
         # ./spec/parser/options_spec.rb:119:in `block (3 levels) in <top (required)>'
     # ./spec/parser/options_spec.rb:119:in `block (3 levels) in <top (required)>'

Finished in 0.64922 seconds (files took 0.29552 seconds to load)
801 examples, 1 failure

Failed examples:

rspec ./spec/parser/options_spec.rb:112 # Thor::Options#parse raises an error for unknown switches

Coverage report generated for RSpec to /tmp/guix-build-ruby-thor-1.2.1.drv-0/source/coverage. 2225 / 2341 LOC (95.04%) covered.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "rspec" arguments: ("spec") exit-status: 1 term-signal: #f stop-signal: #f> 
phase `check' failed after 1.1 seconds
command "rspec" "spec" failed with status 1

The direct dependencies in use are:

Perhaps something to do with the very recent rspec version used?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions