diff --git a/features/bootstrap/Console/ApplicationTester.php b/features/bootstrap/Console/ApplicationTester.php index 791c805..1c18241 100644 --- a/features/bootstrap/Console/ApplicationTester.php +++ b/features/bootstrap/Console/ApplicationTester.php @@ -42,9 +42,11 @@ public function __construct(Application $application) */ public function run($input, array $options = array()) { - $this->input = new StringInput($input); - if (isset($options['interactive'])) { - $this->input->setInteractive($options['interactive']); + if (isset($options['interactive']) && $options['interactive']) { + $this->input = new InteractiveStringInput($input); + } else { + $this->input = new StringInput($input); + $this->input->setInteractive(false); } $this->output = new StreamOutput(fopen('php://memory', 'w', false)); diff --git a/features/bootstrap/Console/InteractiveStringInput.php b/features/bootstrap/Console/InteractiveStringInput.php new file mode 100644 index 0000000..36008e8 --- /dev/null +++ b/features/bootstrap/Console/InteractiveStringInput.php @@ -0,0 +1,12 @@ +applicationTester = $this->createApplicationTester(); $this->applicationTester->putToInputStream(sprintf("%s\n", $answer)); - $this->applicationTester->run('run --no-interaction'); + $this->applicationTester->run('run', array('interactive' => true)); } /** diff --git a/features/describing_a_class.feature b/features/describing_a_class.feature index 2e3ae31..4f131da 100644 --- a/features/describing_a_class.feature +++ b/features/describing_a_class.feature @@ -32,7 +32,6 @@ Feature: Describing a class When I run phpspec Then I should see "class Scenario2\Bundle\DemoBundle\Model\User does not exist" - @disabled Scenario: Generating a class Given I described the "Scenario3/Bundle/DemoBundle/Model/User" When I run phpspec and answer "y" to the first question diff --git a/features/describing_a_controller.feature b/features/describing_a_controller.feature index 46e9373..6a17650 100644 --- a/features/describing_a_controller.feature +++ b/features/describing_a_controller.feature @@ -27,7 +27,6 @@ Feature: Describing a controller """ - @disabled Scenario: Generating a controller Given I described the "Scenario4/Bundle/DemoBundle/Controller/UserController" When I run phpspec and answer "y" to the first question