phpspec/phpspec — pull request #481 by ciaranmcnulty (2014-08-25 09:50:40+00:00)
Title: Generating return value automatically where method is not yet implemented

This adds method-body generation in a specific case:

1. A failing example exists where a method is expected to return a scalar
2. There are no other contradictory examples
3. The method is currently empty (aside from comments)

When I write the spec:

```php
class HelloWorldSpec extends ObjectBehaviour
{
function it_should_return_hello_world()
{
$this->greet()->shouldReturn('Hello, World');
}
}
```
I am asked on subsequent executions:

* Do you want me to create `HelloWorld` for you?
* Do you want me to create `HelloWorld::greet()` for you?
* Do you want me to make `HelloWorld::greet()` always return "Hello, World" for you?

And end up with the class:

```php
class HelloWorld
{

public function greet()
{
return 'Hello, World';
}
}

```