summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorPeter Burkholder <pburkholder@chef.io>2015-03-24 09:54:43 -0400
committerBryan McLellan <btm@chef.io>2015-03-27 13:35:42 -0700
commit36f040b73d99f0b5aae5bdab716ffa1aac060266 (patch)
tree3c4a7c6f05cd737518412f7e1350222a0fee388f /spec/unit
parent3f100678176cf81be8f40a6721b6bd4b44135c76 (diff)
downloadchef-36f040b73d99f0b5aae5bdab716ffa1aac060266.tar.gz
Test for current behavior
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/provider/package/rubygems_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/provider/package/rubygems_spec.rb b/spec/unit/provider/package/rubygems_spec.rb
index b17c216ddd..b2ec482541 100644
--- a/spec/unit/provider/package/rubygems_spec.rb
+++ b/spec/unit/provider/package/rubygems_spec.rb
@@ -547,6 +547,15 @@ describe Chef::Provider::Package::Rubygems do
expect(@new_resource).to be_updated_by_last_action
end
+ it "installs the gem with rubygems.org as an added source" do
+ @new_resource.gem_binary('/foo/bar')
+ @new_resource.source('http://mirror.ops.rhcloud.com/mirror/ruby')
+ expected ="/foo/bar install rspec-core -q --no-rdoc --no-ri -v \"#{@spec_version}\" --source=#{@new_resource.source} --source=https://rubygems.org"
+ expect(@provider).to receive(:shell_out!).with(expected, :env => nil)
+ @provider.run_action(:install)
+ expect(@new_resource).to be_updated_by_last_action
+ end
+
context "when no version is given" do
let(:target_version) { nil }