Sha256: 93af50c75453cbb1aeb8c7e9788ea9af801ecb7f9ff4142c127b2703add5d2e5

Contents?: true

Size: 1.53 KB

Versions: 3

Compression:

Stored size: 1.53 KB

Contents

require 'spec_helper'

# to run specs with what's remembered from vcr
#   $ rake
#
# to run specs with new fresh data from aws api calls
#   $ rake clean:vcr ; time rake
describe Ufo::CLI do
  before(:all) do
    create_starter_project_fixture
    project_root = File.expand_path("../../fixtures/hi", __FILE__)
    @args = "--noop --project-root=#{project_root}"
  end

  describe "ufo" do
    context "docker" do
      it "build builds image" do
        out = execute("bin/ufo docker build #{@args}")
        expect(out).to include("docker build -t tongueroo/hi")
      end

      it "tag shows the tag" do
        out = execute("bin/ufo docker full_image_name #{@args}")
        expect(out).to match(%r{tongueroo/hi:ufo-.{7}})
      end
    end

    context "tasks" do
      it "build builds task definition" do
        out = execute("bin/ufo tasks build #{@args}")
        expect(out).to include("Task Definitions built.")
      end

      it "register it registers all the output task definitions" do
        out = execute("bin/ufo tasks register #{@args}")
        expect(out).to include("register")
      end
    end

    context "ship" do
      it "deploys software" do
        out = execute("bin/ufo ship hi-web-prod #{@args} --no-wait")
        # cannot look for Software shipped! because
        #   ship.deploy unless ENV['TEST'] # to allow me to quickly test CLI portion only
        # just testing the CLI portion.  The ship class itself is tested via ship_spec.rb
        expect(out).to include("Task Definitions built")
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ufo-0.1.1 spec/lib/cli_spec.rb
ufo-0.1.0 spec/lib/cli_spec.rb
ufo-0.0.6 spec/lib/cli_spec.rb