Skip to content

Instantly share code, notes, and snippets.

@wouterj
Created January 8, 2014 17:03
Show Gist options
  • Save wouterj/8320246 to your computer and use it in GitHub Desktop.
Save wouterj/8320246 to your computer and use it in GitHub Desktop.
<?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