lib/templates/module/test/spec/main_spec.rb.tt in rspec-terraspace-0.2.3 vs lib/templates/module/test/spec/main_spec.rb.tt in rspec-terraspace-0.3.0
- old
+ new
@@ -1,14 +1,16 @@
describe "main" do
before(:all) do
- reconfigure_logging # reconfigure Terraspace.logger to a file
mod_path = File.expand_path("../..", __dir__) # the source of the module to test is 2 levels up
# Build terraspace project to use as a test harness
# Will be located at: /tmp/terraspace/test-harnesses/<%= name %>-harness
terraspace.build_test_harness(
name: "<%= name %>-harness",
modules: {<%= name %>: mod_path},
+ # See: https://terraspace.cloud/docs/testing/test-harness/
+ # config: "spec/fixtures/config",
+ # tfvars: {example: "spec/fixtures/tfvars/test.tfvars"},
)
terraspace.up("<%= name %>")
end
after(:all) do
terraspace.down("<%= name %>")
@@ -17,9 +19,9 @@
it "successful deploy" do
# Replace with your own test
expect(true).to be true
# Example
# pp terraspace.outputs
- # output_value = terraspace.output("<%= name %>", "some-output")
+ # output_value = terraspace.output("<%= name %>", "name")
# expect(output_value).to include("some-value")
end
end