Sha256: 34481e01bb5f534304bc025e91b1f9dc085b131aed8d00d2e804d0667f1ad258

Contents?: true

Size: 690 Bytes

Versions: 1

Compression:

Stored size: 690 Bytes

Contents

require "spec_helper"

describe RodeoClown::Deploy do

  let(:instances) do
    double
  end

  context "deploying is successful" do
    before do
      RodeoClown::Deploy.stub(:before_deploy).and_return true
      RodeoClown::Deploy.stub(:deploy).and_return true
      RodeoClown::Deploy.stub(:after_deploy).and_return true
    end

    it "returns true" do
      res = RodeoClown::Deploy.on(instances)

      expect(res).to be_true
    end
  end

  context "deploying is failure" do
    before do
      RodeoClown::Deploy.stub(:before_deploy).and_return false
    end

    it "is a failure" do
      res = RodeoClown::Deploy.on(instances)

      expect(res).to be_false
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rodeo_clown-0.1.0 spec/rodeo_clown/deploy_spec.rb