Sha256: 0add7fb8394f4e50fbc4e5d2b8b914859506c0e964c6795c3b9c04ef02904e0c

Contents?: true

Size: 1.55 KB

Versions: 5

Compression:

Stored size: 1.55 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 apply #{@args}")
      # puts out
      expect(out).to include('eb config save')
    end

    it "should download config from environment" do
      out = execute("bin/jack 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 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 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

5 entries across 5 versions & 1 rubygems

Version Path
jack-eb-1.4.4 spec/lib/cli_spec.rb
jack-eb-1.4.3 spec/lib/cli_spec.rb
jack-eb-1.4.2 spec/lib/cli_spec.rb
jack-eb-1.4.1 spec/lib/cli_spec.rb
jack-eb-1.4.0 spec/lib/cli_spec.rb