diff --git a/lib/react_on_rails/packs_generator.rb b/lib/react_on_rails/packs_generator.rb index 56dba8e6a..2ed028020 100644 --- a/lib/react_on_rails/packs_generator.rb +++ b/lib/react_on_rails/packs_generator.rb @@ -6,7 +6,7 @@ module ReactOnRails # rubocop:disable Metrics/ClassLength class PacksGenerator CONTAINS_CLIENT_OR_SERVER_REGEX = /\.(server|client)($|\.)/ - MINIMUM_SHAKAPACKER_VERSION = [6, 5, 1].freeze + MINIMUM_SHAKAPACKER_VERSION = [7, 2, 1].freeze def self.instance @instance ||= PacksGenerator.new diff --git a/spec/react_on_rails/shakapacker_utils_spec.rb b/spec/react_on_rails/shakapacker_utils_spec.rb index fc94c4660..aecbf5ba9 100644 --- a/spec/react_on_rails/shakapacker_utils_spec.rb +++ b/spec/react_on_rails/shakapacker_utils_spec.rb @@ -13,33 +13,32 @@ module ReactOnRails end describe ".shackapacker_version_requirement_met?" do - minimum_version = [6, 5, 3] + minimum_version = [7, 2, 1] it "returns false when version is lower than minimum_version" do - allow(described_class).to receive(:shakapacker_version).and_return("6.5.0") - + allow(described_class).to receive(:shakapacker_version).and_return("7.2.0") expect(described_class.shackapacker_version_requirement_met?(minimum_version)).to be(false) - allow(described_class).to receive(:shakapacker_version).and_return("6.4.7") + allow(described_class).to receive(:shakapacker_version).and_return("7.1.0") expect(described_class.shackapacker_version_requirement_met?(minimum_version)).to be(false) - allow(described_class).to receive(:shakapacker_version).and_return("5.7.7") + allow(described_class).to receive(:shakapacker_version).and_return("6.6.0") expect(described_class.shackapacker_version_requirement_met?(minimum_version)).to be(false) end it "returns true when version is equal to minimum_version" do - allow(described_class).to receive(:shakapacker_version).and_return("6.5.3") + allow(described_class).to receive(:shakapacker_version).and_return("7.2.1") expect(described_class.shackapacker_version_requirement_met?(minimum_version)).to be(true) end it "returns true when version is greater than minimum_version" do - allow(described_class).to receive(:shakapacker_version).and_return("6.6.0") + allow(described_class).to receive(:shakapacker_version).and_return("7.2.3") expect(described_class.shackapacker_version_requirement_met?(minimum_version)).to be(true) - allow(described_class).to receive(:shakapacker_version).and_return("6.5.4") + allow(described_class).to receive(:shakapacker_version).and_return("7.3.0") expect(described_class.shackapacker_version_requirement_met?(minimum_version)).to be(true) - allow(described_class).to receive(:shakapacker_version).and_return("7.7.7") + allow(described_class).to receive(:shakapacker_version).and_return("8.0.0") expect(described_class.shackapacker_version_requirement_met?(minimum_version)).to be(true) end end