From 06d1e2f77d06fb293794662f0ef558bd5e030426 Mon Sep 17 00:00:00 2001 From: Michal Dabrowski Date: Sun, 11 May 2014 18:17:16 +0200 Subject: [PATCH] Start using behat3 --- behat.yml | 6 ++++++ composer.json | 2 +- features/bootstrap/Console/ApplicationTester.php | 1 + features/bootstrap/FeatureContext.php | 9 ++++----- features/bootstrap/PHPSpecContext.php | 9 ++++----- 5 files changed, 16 insertions(+), 11 deletions(-) create mode 100644 behat.yml diff --git a/behat.yml b/behat.yml new file mode 100644 index 0000000..60e6213 --- /dev/null +++ b/behat.yml @@ -0,0 +1,6 @@ +default: + suites: + default: + contexts: + - FeatureContext + - PHPSpecContext \ No newline at end of file diff --git a/composer.json b/composer.json index 22e43a5..6fbb622 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "phpspec/phpspec": "2.0.*" }, "require-dev": { - "behat/behat": "2.4.*@stable", + "behat/behat": "3.0.*@stable", "symfony/filesystem": "~2.3", "guzzle/http": "~3.0", "bossa/phpspec2-expect": "dev-master" diff --git a/features/bootstrap/Console/ApplicationTester.php b/features/bootstrap/Console/ApplicationTester.php index 7185022..6030bb3 100644 --- a/features/bootstrap/Console/ApplicationTester.php +++ b/features/bootstrap/Console/ApplicationTester.php @@ -1,4 +1,5 @@ useContext('phpspec', new PHPSpecContext()); + } } diff --git a/features/bootstrap/PHPSpecContext.php b/features/bootstrap/PHPSpecContext.php index e377cf2..84b62f9 100644 --- a/features/bootstrap/PHPSpecContext.php +++ b/features/bootstrap/PHPSpecContext.php @@ -1,11 +1,10 @@ setAutoExit(false); - $this->applicationTester = new ApplicationTester($application); + $this->applicationTester = new Console\ApplicationTester($application); $this->applicationTester->run('run --no-interaction -f pretty'); } @@ -91,7 +90,7 @@ public function itShouldPass() } /** - * @Given /^I should see "([^"]*)"$/ + * @Given /^I should see :message"$/ */ public function iShouldSee($message) {