Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 4702f2513a
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (33 sloc) 0.876 kB
Feature: Speciphy DSL using not array but function argument.
Scenario: Execute spec with argument notation
Given a file named "spec/BowlingSpec.php" with:
"""
<?php
namespace Speciphy\DSL;
class Bowling
{
public $score = 0;
public function hit()
{
}
}
return describe('Bowling',
subject(function () {
$bowling = new Bowling;
for ($i = 1; $i <= 20; $i++) {
$bowling->hit(0);
}
return $bowling;
}),
it('score should be 0', function ($bowling) {
expect($bowling->score)->to->be(0);
})
);
"""
When I run Speciphy executable with args "."
Then The output should contain:
"""
.
Bowling
score should be 0
"""
Jump to Line
Something went wrong with that request. Please try again.