<commit_before>require "spec_helper"
require "opsicle/deploy"

module Opsicle
  describe Deploy do
    subject { Deploy.new('derp') }

    context "#execute" do
      let(:client) { double }
      before do
        Client.stub(:new).with('derp').and_return(client)
      end

      it "creates a new deployment" do
        subject.should_receive(:open_deploy).with('derp')
        client.should_receive(:run_command).with('deploy').and_return({deployment_id: 'derp'})
        subject.execute
      end
    end

    context "#client" do
      it "generates a new aws client from the given configs" do
        Client.should_receive(:new).with('derp')
        subject.client
      end
    end

  end
end<commit_msg>Convert deploy spec to rspec3 syntax<commit_after>require "spec_helper"
require "opsicle/deploy"

module Opsicle
  describe Deploy do
    subject { Deploy.new('derp') }

    context "#execute" do
      let(:client) { double }
      before do
        allow(Client).to receive(:new).with('derp').and_return(client)
      end

      it "creates a new deployment" do
        expect(subject).to receive(:open_deploy).with('derp')
        expect(client).to receive(:run_command).with('deploy').and_return({deployment_id: 'derp'})
        subject.execute
      end
    end

    context "#client" do
      it "generates a new aws client from the given configs" do
        expect(Client).to receive(:new).with('derp')
        subject.client
      end
    end

  end
end
{'fraction_non_alphanumeric': 0.11277173913043478, 'fraction_numerical': 0.0006793478260869565, 'mean_word_length': 2.816062176165803, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '5871688', 'n_tokens_mistral': 457, 'n_tokens_neox': 442, 'n_words': 112}