This is with ruby-rspec but I have seen it for other languages too.
BDD is one term but maybe that is to too general as it covers Cucumber which doesn't use this format.


describe "Stuff" do
  it "does stuff" do
     expect(a).to eq 1

1 Answer 1


I've generally seen it referred to as "xSpec"; that style was popularised, if not invented, by RSpec and there are others like JSpec (for Java, which uses it but not describe).

The JavaScript framework Mocha (and other tools that have adopted it, like Cypress) refers to this API as "the BDD interface". Jasmine, which also uses that style but doesn't explicitly name it, describes itself as a "behavior-driven development framework", and was explicitly influenced by RSpec and JSpec.

(It's certainly not xUnit; xUnit test frameworks are those that represent suites as classes implementing TestCase and tests as methods on those classes.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.