Completed
Push — master ( bd630a...f47f8d )
by Steve
01:55
created

TotallyLegitSpec::it_is_initializable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace spec\MeadSteve\DiceApi\DiceDecorators;
4
5
use MeadSteve\DiceApi\Dice;
6
use PhpSpec\ObjectBehavior;
7
use Prophecy\Argument;
8
9
class TotallyLegitSpec extends ObjectBehavior
10
{
11
    private $definiteRoll = 5;
12
13
    function let(Dice $dice)
14
    {
15
        $this->beConstructedWith($dice, $this->definiteRoll);
16
    }
17
18
    function it_is_initializable()
19
    {
20
        $this->shouldHaveType('MeadSteve\DiceApi\DiceDecorators\TotallyLegit');
21
        $this->shouldHaveType('MeadSteve\DiceApi\Dice');
22
    }
23
24
    function it_always_rolls_the_requested_number()
25
    {
26
        $this->roll()->shouldEqual($this->definiteRoll);
27
    }
28
29
    function it_returns_the_size_of_the_base_dice(Dice $dice)
30
    {
31
        $name = "d6";
32
        $dice->name()->willReturn($name);
33
34
        $this->name()->shouldEqual($name);
35
    }
36
}
37