Sha256: 4e1d36d3e9393f2f35baa90b81e6d8dadc4fa9435bddeb05c96f40eb823de3c4

Contents?: true

Size: 1.01 KB

Versions: 8

Compression:

Stored size: 1.01 KB

Contents

ENV['TEST'] = '1'

require "codeclimate-test-reporter"
CodeClimate::TestReporter.start

require "pp"
require 'ostruct'
 
root = File.expand_path('../../', __FILE__)
require "#{root}/lib/jack"

module Helpers
  def execute(cmd)
    puts "Running: #{cmd}" if ENV['DEBUG']
    out = `#{cmd}`
    puts out if ENV['DEBUG']
    out
  end

  def test_options
    {
      noop: true,
      mute: true,
      force: true,
      root: @root,
      env_name: "stag-rails-app-s9"
    }
  end

  def fake_eb_config
      data = <<-EOL
--- 
global:
  application_name: blah
  default_platform: 64bit Amazon Linux 2014.09 v1.2.0 running Docker 1.3.3
EOL
      path = "#{@root}/.elasticbeanstalk/config.yml"
      dir = File.dirname(path)
      FileUtils.mkdir_p(dir) unless File.exist?(path)
      File.write(path, data) unless File.exist?(path)
  end

end

RSpec.configure do |c|
  c.include Helpers
  c.before :all do
    @root = "spec/fixtures/project"
    fake_eb_config
  end
  c.after :all do
    FileUtils.rm_f("#{@root}/.gitignore")
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
jack-eb-0.1.6 spec/spec_helper.rb
jack-eb-0.1.5 spec/spec_helper.rb
jack-eb-0.1.4 spec/spec_helper.rb
jack-eb-0.1.3 spec/spec_helper.rb
jack-eb-0.1.2 spec/spec_helper.rb
jack-eb-0.1.1 spec/spec_helper.rb
jack-eb-0.1.0 spec/spec_helper.rb
jack-eb-0.0.9 spec/spec_helper.rb