Sha256: d92b32959be5fdca743700c19c6bed650ceaea4b8929851d15287c2d4ad2c83c
Contents?: true
Size: 1.13 KB
Versions: 51
Compression:
Stored size: 1.13 KB
Contents
describe Terraspace::Seeder::Content do let(:content) { described_class.new(parsed) } context "basic examples" do let(:parsed) do { "variable"=>{ "project"=>{"default"=>"project-name"}, "name"=>{"type"=>"string"}, } } end it "required_vars" do result = content.required_vars expect(result).to eq({"name"=>{"type"=>"string"}}) end it "optional_vars" do result = content.optional_vars expect(result).to eq({"project"=>{"default"=>"project-name"}}) end end context "description examples" do let(:parsed) do { "variable"=>{ "project"=>{"default"=>"project-name", "description"=>"project name. IE: my-project"}, "name"=>{"type"=>"string"}, "azs"=>{"type"=>"list(string)"}, } } end it "build" do result = content.build expected =<<~EOL # Required variables: name = "string" azs = [...] # list(string) # Optional variables: # project = "project-name" EOL expect(result).to eq(expected) end end end
Version data entries
51 entries across 51 versions & 1 rubygems