link Icon changelog.com

CSpec - BDD with C

Very nice, readable syntax from CSpec that alllows you to do behavior driven development with C.

#include "cspec.h"

static int nbefore_each;

describe "CSpec before_each"
  before_each
    ++nbefore_each;
  end

  it "should be called before each spec"
    nbefore_each should equal 1
  end

  it "should be called before each spec"
   nbefore_each should equal 2
  end
end

[Source on GitHub]


Discussion

Sign in or join to comment

0:00 / 0:00