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:
parent
e3754fb23b
commit
b939ed1797
1 changed files with 23 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue