Extend has_plugin test for gem name and version
The test must ensure that has_plugin does not succeed if an unrelated plugin satisfies the given version spec.
This commit is contained in:
parent
cca19f8241
commit
e756950e2a
|
@ -75,7 +75,7 @@ describe Vagrant do
|
|||
expect(described_class.has_plugin?("bar")).to be_false
|
||||
end
|
||||
|
||||
it "finds plugins by gem version" do
|
||||
it "finds plugins by gem name and version" do
|
||||
specs = [Gem::Specification.new]
|
||||
specs[0].name = "foo"
|
||||
specs[0].version = "1.2.3"
|
||||
|
@ -83,6 +83,7 @@ describe Vagrant do
|
|||
|
||||
expect(described_class.has_plugin?("foo", "~> 1.2.0")).to be_true
|
||||
expect(described_class.has_plugin?("foo", "~> 1.0.0")).to be_false
|
||||
expect(described_class.has_plugin?("bar", "~> 1.2.0")).to be_false
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue