Created
January 8, 2014 17:03
-
-
Save wouterj/8320246 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace spec\Wj\Stoffer; | |
use PhpSpec\ObjectBehavior; | |
use Prophecy\Argument; | |
use Wj\Stoffer\Scissors\ScissorsInterface; | |
class KernelSpec extends ObjectBehavior | |
{ | |
function let(ScissorsInterface $scissors) | |
{ | |
$this->beConstructedWith($scissors); | |
} | |
function it_is_initializable() | |
{ | |
$this->shouldHaveType('Wj\Stoffer\Kernel'); | |
} | |
function it_lints_rst(ScissorsInterface $scissors) | |
{ | |
$rst = <<<RST | |
Headline | |
======== | |
Some *sample* text. | |
RST; | |
$scissors->__construct(Argument::exact($rst))->shouldBeCalled()->willReturn( | |
array( | |
"Headline\n", | |
"========\n", | |
"\n", | |
"Some *sample* text.", | |
) | |
); | |
$this->parse($rst); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment