Skip to content

Commit 261f802

Browse files
committed
Move irb detection to top-level before(:each) block
1 parent 3e8bf09 commit 261f802

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec/bundler/commands/platform_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,12 @@ def should_be_patchlevel_fixnum
941941

942942
context "bundle console", bundler: "< 3" do
943943
before do
944+
begin
945+
require "irb"
946+
rescue LoadError
947+
skip "This spec requires IRB to be available"
948+
end
949+
944950
install_gemfile <<-G
945951
source "https://gem.repo1"
946952
gem "myrack"
@@ -950,12 +956,6 @@ def should_be_patchlevel_fixnum
950956
end
951957

952958
it "starts IRB with the default group loaded when ruby version matches", :readline do
953-
begin
954-
require "irb"
955-
rescue LoadError
956-
skip "This spec requires IRB to be available"
957-
end
958-
959959
gemfile <<-G
960960
source "https://gem.repo1"
961961
gem "myrack"

0 commit comments

Comments
 (0)