Sha256: 72fa203c8abd14518eb81ac10f8e95f80abc10b721323653ad9ac109604e55bb

Contents?: true

Size: 1.58 KB

Versions: 3

Compression:

Stored size: 1.58 KB

Contents

require 'spec_helper'

describe Jack::CLI do
  before(:all) do
    @args = "hi-web-stag-1 --root spec/fixtures/project --noop --sure"
    FileUtils.rm_rf("spec/fixtures/project/.elasticbeanstalk")
  end

  describe "jack" do
    it "should create environment" do
      out = execute("bin/jack create #{@args}")
      # puts out
      expect(out).to include('eb create')
      expect(out).to include('--cname hi-web-stag-1')
      expect(out).to include('--keyname "default"')
      expect(out).to include('hi-web-stag-1')
    end

    it "should upload and apply config to environment" do
      out = execute("bin/jack config apply #{@args}")
      # puts out
      expect(out).to include('eb config save')
    end

    it "should download config from environment" do
      out = execute("bin/jack config get #{@args}")
      # puts out
      expect(out).to include("Config downloaded")
    end

    it "should diff local config from eb environment config" do
      out = execute("bin/jack config diff #{@args}")
      # puts out
      expect(out).to include("diff")
    end

    it "should reformat the local config to a sorted yaml format" do
      out = execute("bin/jack config sort #{@args}")
      # puts out
      expect(out).to include("Reformatted the local config")
    end

    it "should deploy environment" do
      out = execute("bin/jack deploy #{@args}")
      # puts out
      expect(out).to include("eb deploy")
    end

    it "should terminate environment" do
      out = execute("bin/jack terminate #{@args}")
      # puts out
      expect(out).to include("Whew that was close")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jack-eb-1.3.0 spec/lib/cli_spec.rb
jack-eb-1.2.1 spec/lib/cli_spec.rb
jack-eb-1.2.0 spec/lib/cli_spec.rb