Sha256: a4b0ba81dd60b37f79a0e23c53a3bb48dcf7db74ff2802a6c38a525a7c99acc4

Contents?: true

Size: 554 Bytes

Versions: 3

Compression:

Stored size: 554 Bytes

Contents

require 'spec_helper'

describe Ridley::EnvironmentResource do
  subject { described_class.new(double('registry')) }

  describe "#delete_all" do
    let(:default_env) { double(name: "_default") }
    let(:destroy_env) { double(name: "destroy_me") }

    before do
      subject.stub(all: [ default_env, destroy_env ])
    end

    it "does not destroy the '_default' environment" do
      subject.stub(future: double('future', value: nil))
      subject.should_not_receive(:future).with(:delete, default_env)

      subject.delete_all
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ridley-0.11.2 spec/unit/ridley/resources/environment_resource_spec.rb
ridley-0.11.1 spec/unit/ridley/resources/environment_resource_spec.rb
ridley-0.11.0.rc1 spec/unit/ridley/resources/environment_resource_spec.rb