8000 How to run the tests? · Issue #10 · jostly/specd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
How to run the tests? #10
Open
Open
@kingsleyh

Description

@kingsleyh

Sorry if this seems like a stupid question but I'm new to D and I can't figure out how to run the tests with dub:

this is my testfile.d

module cool;

class Yeah{

  public string name(){
    return "kings";
  }


}

unittest {

    import specd.specd;

    describe("a string")
        .should("have a length property", "foo".length.must.equal(3))
    ;
}

and my dub file:

{
    "name": "test stuff",
    "description": "A minimal D application.",
    "copyright": "Copyright © 2015, kings",
    "authors": ["kings"],
    "dependencies": {
        "specd": "~>0.1.0"
    },
    "configurations": [
    {
        "name": "test",
        "versions": ["specrunner"],
       "targetType": "library"
    }
]
}

and when I run:

dub test --config=test

it looks like it's working but it always passes:

Compiling using dmd...
Linking...
Running ./__test__test__ 
All unit tests have been run successfully.

even if I put a failing thing in the unittest - It still says it passes

What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0