Skip to content

Commit

Permalink
Merge pull request #8 from etki/master
Browse files Browse the repository at this point in the history
Put output directory management into Codeception's hands
  • Loading branch information
robot-bucket committed Jan 8, 2015
2 parents 222a78c + a574e4a commit 058d0db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Yandex/Allure/Adapter/AllureAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Yandex\Allure\Adapter;

use Codeception\Configuration;
use Codeception\Event\StepEvent;
use Codeception\Event\SuiteEvent;
use Codeception\Event\TestEvent;
Expand All @@ -20,10 +21,10 @@
use Yandex\Allure\Adapter\Event\TestSuiteFinishedEvent;
use Yandex\Allure\Adapter\Event\TestSuiteStartedEvent;
use Yandex\Allure\Adapter\Model;
use Yandex\Allure\Adapter\Support\Utils;

const OUTPUT_DIRECTORY_PARAMETER = 'outputDirectory';
const DELETE_PREVIOUS_RESULTS_PARAMETER = 'deletePreviousResults';
const DEFAULT_RESULTS_DIRECTORY = 'allure-results';

class AllureAdapter extends Extension
{
Expand Down Expand Up @@ -76,7 +77,8 @@ public function _initialize()

private static function getDefaultOutputDirectory()
{
return 'tests' . DIRECTORY_SEPARATOR . 'allure-results';
// outputDir return value already contains directory separator
return Configuration::outputDir() . DEFAULT_RESULTS_DIRECTORY;
}

public function suiteBefore(SuiteEvent $suiteEvent)
Expand Down

0 comments on commit 058d0db

Please sign in to comment.