1

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.

Example:

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

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, privacy policy and cookie policy

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