Sha256: 1ddf0a9b81c0a6c511239cff71ca3b614e144d493ec3fb5d3906566ab4d2fa1d
Contents?: true
Size: 1.34 KB
Versions: 3
Compression:
Stored size: 1.34 KB
Contents
require File.join(File.dirname(__FILE__), "..", "..", "spec_helper.rb") require "wellcar/templates/dockerfile_init" RSpec.describe Wellcar::Templates::DockerfileInit do describe "#render" do subject { template.render } context "with a first set of inputs" do let(:template) { Wellcar::Templates::DockerfileInit.new("2.6.6", "test_app") } it { is_expected.to include "FROM ruby:2.6.6 AS base_for_new" } it { is_expected.to include "WORKDIR /app/test_app" } it { is_expected.to include 'CMD ["rails", "new", "--database", "postgresql", "--skip-bundle", "--skip-webpack-install", "--skip-test", "."]' } it { is_expected.to include "COPY --from=new_rails /app/test_app/ ." } it { is_expected.to include "COPY --from=bundle_for_lockfile /app/test_app/ ." } end context "with another set of inputs" do let(:template) { Wellcar::Templates::DockerfileInit.new("1.0.0", "old_app") } it { is_expected.to include "ruby:1.0.0" } it { is_expected.to include "WORKDIR /app/old_app" } it { is_expected.to include 'CMD ["rails", "new", "--database", "postgresql", "--skip-bundle", "--skip-webpack-install", "--skip-test", "."]' } it { is_expected.to include "COPY --from=new_rails /app/old_app/ ." } it { is_expected.to include "COPY --from=bundle_for_lockfile /app/old_app/ ." } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wellcar-0.0.3 | spec/wellcar/templates/dockerfile_init_spec.rb |
wellcar-0.0.2 | spec/wellcar/templates/dockerfile_init_spec.rb |
wellcar-0.0.1 | spec/wellcar/templates/dockerfile_init_spec.rb |