<commit_before># Copyright (c) 2009-2012 VMware, Inc.

require "spec_helper"

describe Bosh::AwsCloud::Cloud do
  it "should delete the stemcell" do
    stemcell = double(Bosh::AwsCloud::Stemcell)
    Bosh::AwsCloud::Stemcell.stub(:find => stemcell)

    cloud = mock_cloud

    stemcell.should_receive(:delete)

    cloud.delete_stemcell("ami-xxxxxxxx")
  end
end<commit_msg>Better expectation in delete_stemcell for AWS CPI<commit_after># Copyright (c) 2009-2012 VMware, Inc.

require "spec_helper"

describe Bosh::AwsCloud::Cloud do
  it "should delete the stemcell" do
    stemcell = double(Bosh::AwsCloud::Stemcell)

    cloud = mock_cloud do |_, region|
      Bosh::AwsCloud::Stemcell.stub(:find).with(region, "ami-xxxxxxxx").and_return(stemcell)
    end

    stemcell.should_receive(:delete)

    cloud.delete_stemcell("ami-xxxxxxxx")
  end
end
{'fraction_non_alphanumeric': 0.11868390129259694, 'fraction_numerical': 0.01880141010575793, 'mean_word_length': 4.795918367346939, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 3, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5927908', 'n_tokens_mistral': 322, 'n_tokens_neox': 285, 'n_words': 62}