Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Switch JRuby 9.1.17.0 to Docker #3018

Merged
merged 3 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion spec/integration/bisect_runners_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,18 @@ def with_runner(&block)
end
"

rspec_description =
if RUBY_VERSION.to_f > 3.2
"module RSpec"
else
"RSpec:Module"
end

with_runner do |runner|
expect {
runner.original_results
}.to raise_error(Bisect::BisectFailedError, a_string_including(
"undefined method `escribe' for RSpec:Module",
"undefined method `escribe' for #{rspec_description}",
'stdout in a_spec',
'stderr in a_spec'
))
Expand Down
6 changes: 6 additions & 0 deletions spec/integration/bisect_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ def bisect(cli_args, expected_status=nil)
normalize_durations(formatter_output.string)
end

before do
if RSpec::Support::Ruby.jruby? && RSpec::Support::Ruby.jruby_version == '9.1.17.0'
skip "These specs are currently broken on JRuby 9.1.17.0"
end
end

context "when a load-time problem occurs while running the suite" do
it 'surfaces the stdout and stderr output to the user' do
output = bisect(%w[spec/rspec/core/resources/fail_on_load_spec.rb_], 1)
Expand Down
12 changes: 10 additions & 2 deletions spec/integration/spec_file_load_errors_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,20 +147,28 @@
run_command "1_spec.rb 2_spec.rb 3_spec.rb"
expect(last_cmd_exit_status).to eq(error_exit_code)
output = normalize_durations(last_cmd_stdout)

object_suffix =
if RUBY_VERSION.to_f > 3.2
""
else
":Object"
end

expect(output).to eq unindent(<<-EOS)

An error occurred while loading ./1_spec.rb.
Failure/Error: boom

NameError:
undefined local variable or method `boom' for main:Object
undefined local variable or method `boom' for main#{object_suffix}
# ./1_spec.rb:1#{spec_line_suffix}

An error occurred while loading ./3_spec.rb.
Failure/Error: boom

NameError:
undefined local variable or method `boom' for main:Object
undefined local variable or method `boom' for main#{object_suffix}
# ./3_spec.rb:1#{spec_line_suffix}


Expand Down
4 changes: 4 additions & 0 deletions spec/rspec/core_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
before(:example) do
skip "Not reliably working on #{RUBY_DESCRIPTION}"
end
elsif RSpec::Support::Ruby.jruby? && JRUBY_VERSION =~ /9\.1\.17\.0/
before(:example, :description => /spec files/) do
pending "JRuby 9.1.17.0 generates unrelated warnings"
end
end
end

Expand Down