Sha256: c6f50ead3cd7d73ff80d8d6b934367c4ab98fcbbea8e14d14a73b23cae940dbf

Contents?: true

Size: 657 Bytes

Versions: 3

Compression:

Stored size: 657 Bytes

Contents

require File.join(File.dirname(__FILE__), "..", "..", "spec_helper.rb")
require "yaml"
require "wellcar/templates/docker_entrypoint"

RSpec.describe Wellcar::Templates::DockerEntrypoint do
  describe "#render" do
    subject { template.render }

    let(:template) { described_class.new }

    let(:pid_script) do
      <<SCRIPT
if [ -f tmp/pids/server.pid ]; then
  echo "Removing server.pid file"
  rm tmp/pids/server.pid
fi
SCRIPT
    end

    let(:launch_script) do
      <<SCRIPT
bundle install
yarn install --check-files

exec "$@"
SCRIPT
    end

    it { is_expected.to include pid_script }
    it { is_expected.to include launch_script }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wellcar-0.0.3 spec/wellcar/templates/docker_entrypoint_spec.rb
wellcar-0.0.2 spec/wellcar/templates/docker_entrypoint_spec.rb
wellcar-0.0.1 spec/wellcar/templates/docker_entrypoint_spec.rb