summaryrefslogtreecommitdiff
path: root/spec/unit/knife/cookbook_download_spec.rb
diff options
context:
space:
mode:
authorJulian C. Dunn <jdunn@opscode.com>2013-04-30 01:38:22 -0400
committerBryan McLellan <btm@opscode.com>2013-06-18 10:38:31 -0700
commitd2a420a48c6bfe4a6c57569c9fea2e3fbaaea5ad (patch)
tree07436a2d7ca8d811bbac48a8d860a03b406f4479 /spec/unit/knife/cookbook_download_spec.rb
parentf33f0f7953d65271ac4e7f81101b7fa50671f096 (diff)
downloadchef-d2a420a48c6bfe4a6c57569c9fea2e3fbaaea5ad.tar.gz
CHEF-4022 Remove local variable from determine_version due to memoization as noted by @danielsdeleo
Diffstat (limited to 'spec/unit/knife/cookbook_download_spec.rb')
-rw-r--r--spec/unit/knife/cookbook_download_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/unit/knife/cookbook_download_spec.rb b/spec/unit/knife/cookbook_download_spec.rb
index bea5c602c8..15e2bad886 100644
--- a/spec/unit/knife/cookbook_download_spec.rb
+++ b/spec/unit/knife/cookbook_download_spec.rb
@@ -157,7 +157,7 @@ describe Chef::Knife::CookbookDownload do
end
it 'should ask which version to download and return it if there is more than one' do
- @knife.should_receive(:available_versions).and_return(['1.0.0', '2.0.0'])
+ @knife.should_receive(:available_versions).at_least(:once).and_return(['1.0.0', '2.0.0'])
@knife.should_receive(:ask_which_version).and_return('1.0.0')
@knife.determine_version.should == '1.0.0'
end