Skip to content

Commit

Permalink
don't mock gem availablity function
Browse files Browse the repository at this point in the history
  • Loading branch information
AbanoubGhadban committed Dec 19, 2024
1 parent a814641 commit eb0edbd
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions spec/react_on_rails/utils_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit eb0edbd

Please sign in to comment.