summaryrefslogtreecommitdiffstats
path: root/spec/unit/provider/package
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2011-04-04 04:50:38 +1000
committerJames Turnbull <james@lovedthanlost.net>2011-04-04 04:50:38 +1000
commitd2bacd308ea214151f5c1f43ec62aad8075da41b (patch)
tree74781165f5f932a36ad50b4b93e3d0c833f51a33 /spec/unit/provider/package
parent9d17809e5b240aa80d2c30f4d9625d4812802b8f (diff)
downloadpuppet-d2bacd308ea214151f5c1f43ec62aad8075da41b.tar.gz
puppet-d2bacd308ea214151f5c1f43ec62aad8075da41b.tar.xz
puppet-d2bacd308ea214151f5c1f43ec62aad8075da41b.zip
Fixed #3127 - Fixed gem selection regex
Previously if the gem json_pure was installed and you requested the gem json then the regex matched too soon and falshly indicated that the json gem was already installed. Also updated to add the --no-ri and no-rdoc options and fix tests.
Diffstat (limited to 'spec/unit/provider/package')
-rw-r--r--spec/unit/provider/package/gem_spec.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/unit/provider/package/gem_spec.rb b/spec/unit/provider/package/gem_spec.rb
index 063e1474b..32c067a60 100644
--- a/spec/unit/provider/package/gem_spec.rb
+++ b/spec/unit/provider/package/gem_spec.rb
@@ -42,8 +42,18 @@ describe provider_class do
@provider.install
end
+ it "should specify that documentation should not be included" do
+ @provider.expects(:execute).with { |args| args[3] == "--no-rdoc" }.returns ""
+ @provider.install
+ end
+
+ it "should specify that RI should not be included" do
+ @provider.expects(:execute).with { |args| args[4] == "--no-ri" }.returns ""
+ @provider.install
+ end
+
it "should specify the package name" do
- @provider.expects(:execute).with { |args| args[3] == "myresource" }.returns ""
+ @provider.expects(:execute).with { |args| args[5] == "myresource" }.returns ""
@provider.install
end