Sha256: 7a9fa4e987eb4ce8b8630aca6fa5cad24b5efac460f75ccd27c9955d186e8ffc

Contents?: true

Size: 808 Bytes

Versions: 11

Compression:

Stored size: 808 Bytes

Contents

describe Ufo::Ship do
  before(:each) do
    create_ufo_project
  end
  let(:options) do
    {
      mute: true
    }
  end
  let(:task_definition) { "hi-migrate-prod" }
  let(:task) do
    task = Ufo::Task.new(task_definition, options)
    allow(task).to receive(:ecs).and_return(ecs_client)
    task
  end

  context "hi-migrate-prod" do
    it "should migrate the database" do
      task.run

      expect(task.ecs).to have_received(:run_task)
    end
  end

  # mocks
  def ecs_client
    ecs = double("ecs")
    fake_response = double('fake-response').as_null_object
    allow(ecs).to receive(:run_task).and_return(fake_response)
    allow(ecs).to receive(:list_task_definitions).and_return(fake_response)
    allow(ecs).to receive(:describe_task_definition).and_return(fake_response)
    ecs
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ufo-4.1.7 spec/lib/task_spec.rb
ufo-4.1.6 spec/lib/task_spec.rb
ufo-4.1.5 spec/lib/task_spec.rb
ufo-4.1.4 spec/lib/task_spec.rb
ufo-4.1.2 spec/lib/task_spec.rb
ufo-4.1.1 spec/lib/task_spec.rb
ufo-4.1.0 spec/lib/task_spec.rb
ufo-4.0.3 spec/lib/task_spec.rb
ufo-4.0.2 spec/lib/task_spec.rb
ufo-4.0.1 spec/lib/task_spec.rb
ufo-4.0.0 spec/lib/task_spec.rb