From 07e701efa12add90611cde63cb8491a20745d4a4 Mon Sep 17 00:00:00 2001 From: Abanoub Ghadban Date: Thu, 19 Dec 2024 16:15:52 +0200 Subject: [PATCH] don't mock gem availablity function --- spec/react_on_rails/utils_spec.rb | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/spec/react_on_rails/utils_spec.rb b/spec/react_on_rails/utils_spec.rb index 7f02ef053..d87873ef0 100644 --- a/spec/react_on_rails/utils_spec.rb +++ b/spec/react_on_rails/utils_spec.rb @@ -34,12 +34,6 @@ module ReactOnRails end shared_context "with shakapacker enabled" do - before do - # Mock that shakapacker is not installed, so webpacker will be used instead - allow(described_class).to receive(:gem_available?).with("shakapacker").and_return(true) - allow(described_class).to receive(:gem_available?).with("webpacker").and_return(false) - end - include_context "with packer enabled" # We don't need to mock anything here because the shakapacker gem is already installed and will be used by default @@ -52,12 +46,6 @@ module ReactOnRails end shared_context "with webpacker enabled" do - before do - # Mock that shakapacker is not installed, so webpacker will be used instead - allow(described_class).to receive(:gem_available?).with("shakapacker").and_return(false) - allow(described_class).to receive(:gem_available?).with("webpacker").and_return(true) - end - include_context "with packer enabled" it "uses webpacker" do