Permalink
Browse files

Described HelloWorld#sayHello, it says Hello!

  • Loading branch information...
peterjmit committed Apr 30, 2013
1 parent e16381d commit f2cfc57dd99b14226a417863785eaf6b660fc651
Showing with 28 additions and 0 deletions.
  1. +19 −0 spec/HelloWorldSpec.php
  2. +9 −0 src/HelloWorld.php
View
@@ -0,0 +1,19 @@
<?php
namespace spec;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
class HelloWorldSpec extends ObjectBehavior
{
function it_is_initializable()
{
$this->shouldHaveType('HelloWorld');
}
function it_should_say_hello()
{
$this->sayHello()->shouldReturn('Hello!');
}
}
View
@@ -0,0 +1,9 @@
<?php
class HelloWorld
{
public function sayHello()
{
return 'Hello!';
}
}

0 comments on commit f2cfc57

Please sign in to comment.