Skip to content

Latest commit

 

History

History
52 lines (39 loc) · 1.01 KB

README.md

File metadata and controls

52 lines (39 loc) · 1.01 KB

BDD

Behavior Driven Development testing framework for the D programming language

Documentation

https://workhorsy.github.io/BDD/4.1.0/

Example

import std.stdio : stdout;


int add(int a, int b) {
	return a + b;
}

unittest {
	import BDD;

	describe("math#add",
		before(delegate() {
			stdout.writeln("Before called ...");
		}),
		after(delegate() {
			stdout.writeln("After called ...");
		}),
		it("Should add positive numbers", delegate() {
			add(5, 7).shouldEqual(12);
		}),
		it("Should add negative numbers", delegate() {
			add(5, -7).shouldEqual(-2);
		})
	);
}

Generate documentation

dub --build=docs

Run unit tests

dub test

Dub version Dub downloads License