diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-03-04 18:44:28 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-04-10 17:29:39 +0900 |
| commit | 3390b6a515c4195905ef3be715fb611cce7ccaf5 (patch) | |
| tree | 88e2d6e111b28d86dc7b9f36e4e3e5038abce516 | |
| parent | c5c0bb5afcbbc054c9e8f4e4b9209253d42f7326 (diff) | |
Added simple failing example
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12847
| -rw-r--r-- | spec/bundled_gems_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/bundled_gems_spec.rb b/spec/bundled_gems_spec.rb index 0eb142b7ab..54f52864cd 100644 --- a/spec/bundled_gems_spec.rb +++ b/spec/bundled_gems_spec.rb @@ -361,4 +361,17 @@ RSpec.describe "bundled_gems.rb" do expect(err).to be_empty end + + describe ".force_activate" do + context "when gem activation fails" do + before do + allow_any_instance_of(Bundler::Runtime).to receive(:setup).and_raise(Bundler::GemNotFound) + end + + it "warns about installation requirement" do + expect_any_instance_of(Object).to receive(:warn) + Gem::BUNDLED_GEMS.force_activate("csv") + end + end + end end |
