lib/rspec/terraspace/ts.rb in rspec-terraspace-0.1.0 vs lib/rspec/terraspace/ts.rb in rspec-terraspace-0.2.0

- old
+ new

@@ -5,11 +5,10 @@ extend Memoist CLI = ::Terraspace::CLI def build_test_harness(options={}) - puts "Building test harness..." project = Project.new(options) root = project.create Terraspace.root = root # switch root to the generated test harness end @@ -35,11 +34,14 @@ FileUtils.mkdir_p(File.dirname(out_path)) run("output #{@mod.name} --format json --out #{out_path}") end def output(mod, name) - data = JSON.load(IO.read(out_path)) - data.dig(name, "value") + outputs.dig(name, "value") + end + + def outputs(mod) + JSON.load(IO.read(out_path)) end def out_path "#{Terraspace.tmp_root}/rspec/output.json" end