Skip to content

Commit 07e701e

Browse files
don't mock gem availablity function
1 parent e555e97 commit 07e701e

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

spec/react_on_rails/utils_spec.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,6 @@ module ReactOnRails
3434
end
3535

3636
shared_context "with shakapacker enabled" do
37-
before do
38-
# Mock that shakapacker is not installed, so webpacker will be used instead
39-
allow(described_class).to receive(:gem_available?).with("shakapacker").and_return(true)
40-
allow(described_class).to receive(:gem_available?).with("webpacker").and_return(false)
41-
end
42-
4337
include_context "with packer enabled"
4438

4539
# 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
5246
end
5347

5448
shared_context "with webpacker enabled" do
55-
before do
56-
# Mock that shakapacker is not installed, so webpacker will be used instead
57-
allow(described_class).to receive(:gem_available?).with("shakapacker").and_return(false)
58-
allow(described_class).to receive(:gem_available?).with("webpacker").and_return(true)
59-
end
60-
6149
include_context "with packer enabled"
6250

6351
it "uses webpacker" do

0 commit comments

Comments
 (0)