rspec / rspec-core

RSpec runner and formatters
http://rspec.info
MIT License
1.23k stars 765 forks source link

Add TruffleRuby support #2946

Closed gogainda closed 2 years ago

gogainda commented 2 years ago
1) Spec file load errors prints a warning when a helper file exits early
     Failure/Error:
             expect(output).to eq unindent(<<-EOS)

               While loading ./helper_with_exit.rb an `exit` / `raise SystemExit` occurred, RSpec will now quit.
               Failure/Error: exit 999

               SystemExit:
                 exit
               # ./helper_with_exit.rb:1:in `exit'
               # ./helper_with_exit.rb:1#{spec_line_suffix}
             EOS

       expected: "\nWhile loading ./helper_with_exit.rb an `exit` / `raise SystemExit` occurred, RSpec will now quit.\nFailure/Error: exit 999\n\nSystemExit:\n  exit\n# ./helper_with_exit.rb:1:in `exit'\n# ./helper_with_exit.rb:1:in `<top (required)>'\n"
            got: "\nWhile loading ./helper_with_exit.rb an `exit` / `raise SystemExit` occurred, RSpec will now quit.\nFailure/Error: exit 999\n\nSystemExit:\n  exit\n# ./helper_with_exit.rb:1:in `<top (required)>'\n"

       (compared using ==)

       Diff:
       @@ -4,6 +4,5 @@

        SystemExit:
          exit
       -# ./helper_with_exit.rb:1:in `exit'
        # ./helper_with_exit.rb:1:in `<top (required)>'

@eregon one failure left

pirj commented 2 years ago

Side observation, unrelated to the PR. Wondering why GitHub check for ruby-head is red, while we have continue-on-error: ${{ matrix.allow_failure || endsWith(matrix.ruby, 'head') }}. It was usually swallowing all errors and (deceptively) showing as green.

PS probably GH changed that to be less deceptive and avoid confusion between ignored failures and legitimately green builds.

eregon commented 2 years ago

PS probably GH changed that to be less deceptive and avoid confusion between ignored failures and legitimately green builds.

Would be great if they fixed something there, people have been complaining about allow-failure support for more than a year (me included).

JonRowe commented 2 years ago

Can you rebase this again, github appears to be MIA

gogainda commented 2 years ago

@JonRowe PR is ready, could you review it one more time?

gogainda commented 2 years ago

@eregon should I convert the failing spec to an issue?

eregon commented 2 years ago

@gogainda Could you mention it on the rspec-metagem issue for TruffleRuby support, and I or bjfish will take a look?