Wynn Netherland changelog.com/posts

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 or subscribe

Player art
  0:00 / 0:00