Logo: Relish

  1. Sign in

Project: Dspec

Disabling the dspec global functions

In order to prevent name clashes
As a developer
I need to prevent dspec loading the global functions

Scenarios
Disable global via with an environment variable
Given
a file named "TestSpec.php" with:
<?php

use DSpec\DSpec as ds;

function fail() {}

ds::describe("test", function() {
    ds::it("should pass", function() {
    });
});
When
I run DSPEC_NO_GLOBALS=1 dspec TestSpec.php
Then
the output should contain "1 example passed"

Last published over 5 years ago by Dave Marshall.