Skip to content

Commit

Permalink
added specs for unfixable requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
kbukum1 committed Jun 27, 2024
1 parent a740c39 commit bb91a7e
Showing 1 changed file with 78 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,24 @@
end
end

context "when a > req was specified" do
let(:requirement_txt_req_string) { "> 1.3.0" }

it { is_expected.to eq(requirement_txt_req) }

context "when dealing with exactly the version being updated to" do
let(:requirement_txt_req_string) { "> 1.5.0" }

its([:requirement]) { is_expected.to eq(:unfixable) }
end

context "when dealing with the version lower than the lower bound" do
let(:requirement_txt_req_string) { "> 1.4.0" }

its([:requirement]) { is_expected.to eq(:unfixable) }
end
end

context "when a range requirement was specified" do
let(:requirement_txt_req_string) { ">=1.3.0" }

Expand Down Expand Up @@ -496,6 +514,36 @@
it { is_expected.to eq(pyproject_req) }
end

context "when a != req was specified" do
let(:pyproject_req_string) { "!= 1.3.0" }

it { is_expected.to eq(pyproject_req) }

context "when dealing with exactly the version being updated to" do
let(:pyproject_req_string) { "!=1.5.0" }

its([:requirement]) { is_expected.to eq(:unfixable) }
end
end

context "when a > req was specified" do
let(:pyproject_req_string) { "> 1.3.0" }

it { is_expected.to eq(pyproject_req) }

context "when dealing with exactly the version being updated to" do
let(:pyproject_req_string) { "> 1.5.0" }

its([:requirement]) { is_expected.to eq(:unfixable) }
end

context "when dealing with the version lower than the lower bound" do
let(:pyproject_req_string) { "> 1.4.0" }

its([:requirement]) { is_expected.to eq(:unfixable) }
end
end

context "when a range requirement was specified" do
let(:pyproject_req_string) { ">=1.3.0" }

Expand Down Expand Up @@ -636,6 +684,36 @@
it { is_expected.to eq(pyproject_req) }
end

context "when a != req was specified" do
let(:pyproject_req_string) { "!= 1.3.0" }

it { is_expected.to eq(pyproject_req) }

context "when dealing with exactly the version being updated to" do
let(:pyproject_req_string) { "!=1.5.0" }

its([:requirement]) { is_expected.to eq(:unfixable) }
end
end

context "when a > req was specified" do
let(:pyproject_req_string) { "> 1.3.0" }

it { is_expected.to eq(pyproject_req) }

context "when dealing with exactly the version being updated to" do
let(:pyproject_req_string) { "> 1.5.0" }

its([:requirement]) { is_expected.to eq(:unfixable) }
end

context "when dealing with the version lower than the lower bound" do
let(:pyproject_req_string) { "> 1.4.0" }

its([:requirement]) { is_expected.to eq(:unfixable) }
end
end

context "when a range requirement was specified" do
let(:pyproject_req_string) { ">=1.3.0" }

Expand Down

0 comments on commit bb91a7e

Please sign in to comment.