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