lib/lopata/observers/web_logger.rb in lopata-0.1.26 vs lib/lopata/observers/web_logger.rb in lopata-0.1.27

- old
+ new

@@ -44,9 +44,15 @@ def start(count) @launch_id = JSON.parse(post("/projects/#{project_code}/builds/#{build_number}/launches.json", body: {total: count}).body)['id'] end + # Create test stubs for all the scenarios within then build + def init_scenarios(world) + post("/projects/#{project_code}/builds/#{build_number}/tests.json", + body: { scenarios: world.scenarios.map { { title: _1.title } } }) + end + def add_attempt(scenario, finished) status = scenario.failed? ? Lopata::FAILED : Lopata::PASSED steps = build_hashes(scenario.steps) request = { status: status, steps: steps, launch: { id: @launch_id, finished: finished } } test = test_id(scenario) \ No newline at end of file