Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RSpec 3.12 kwargs. #986

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix RSpec 3.12 kwargs. #986

wants to merge 1 commit into from

Conversation

voxik
Copy link

@voxik voxik commented Nov 4, 2022

This is broken by rspec/rspec-mocks#1461

I don't have complete patch yet, so ATM this is mostly attempt to run the CI and highlight all the issues.

@voxik voxik changed the title [WIP] Fix RSpec 3.12 kwargs. Fix RSpec 3.12 kwargs. Nov 4, 2022
@voxik
Copy link
Author

voxik commented Nov 4, 2022

I have updated the PR. It should hopefully cover all cases.

@voxik
Copy link
Author

voxik commented Nov 4, 2022

BTW I am observing failures such as:

  1) Guard::DslDescriber.notifiers shows the notifiers and their options
     Failure/Error: expect(@output).to eq result

       expected: "  +----------------+-----------+------+--------+-------+\n  | Name           | Available | Used | Op...18        | \u2718   |        |       |\n  +----------------+-----------+------+--------+-------+\n"
            got: "  +----------------+-----------+------+--------+-------+\n  | Name           | Available | Used | Op...         | \u2718    |        |       |\n  +----------------+-----------+------+--------+-------+\n"

       (compared using ==)

       Diff:

       @@ -1,8 +1,8 @@
          +----------------+-----------+------+--------+-------+
          | Name           | Available | Used | Option | Value |
          +----------------+-----------+------+--------+-------+
       -  | gntp           | ?        | ?   | sticky | true  |
       +  | gntp           | ?         | ?    | sticky | true  |
          +----------------+-----------+------+--------+-------+
       -  | terminal_title | ?        | ?   |        |       |
       +  | terminal_title | ?         | ?    |        |       |
          +----------------+-----------+------+--------+-------+
     # ./spec/lib/guard/dsl_describer_spec.rb:129:in `block (3 levels) in <top (required)>'

and indeed, the source file si missing one space as far as I can tell. Is it some wrongly resolved patch?

+----------------+-----------+------+--------+-------+
| Name | Available | Used | Option | Value |
+----------------+-----------+------+--------+-------+
| gntp | ✔ | ✔ | sticky | true |
+----------------+-----------+------+--------+-------+
| terminal_title | ✘ | ✘ | | |
+----------------+-----------+------+--------+-------+

@dai-vdr
Copy link

dai-vdr commented Sep 23, 2023

Hello @voxik,

I think "missing one space" is not your patch's problem but it is caused by formatador updated to 0.3.0 or later. It calcurates widths of "HEAVY CHECK MARK" (✔) and "HEAVY BALLOT X" (✘) using Unicode.width instead of length previously (geemus/formatador#26).

But I'm sorry that unicode width is very complicated and I do not have any idea to solve this.

@mtasaka
Copy link

mtasaka commented Dec 10, 2024

For now I will create a "bug" report to track this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants