1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Add a couple of tests for multiple version definitions

Since I'm about to document this.
This commit is contained in:
William Johnston 2017-10-10 06:52:38 -05:00
parent e3754fb23b
commit b939ed1797

View file

@ -89,6 +89,29 @@ module Capistrano
end
end
end
context "with multiple versions" do
let(:current_version) { "3.5.9" }
context "valid" do
let(:version) { [">= 3.5.0", "< 3.5.10"] }
it { is_expected.to be_truthy }
end
context "invalid" do
let(:version) { [">= 3.5.0", "< 3.5.8"] }
it "fails" do
expect { subject }.to raise_error(RuntimeError)
end
end
context "invalid" do
let(:version) { ["> 3.5.9", "< 3.5.13"] }
it "fails" do
expect { subject }.to raise_error(RuntimeError)
end
end
end
end
end
end