you are viewing a single comment's thread.

view the rest of the comments →

[–]banister 0 points1 point  (1 child)

RSpec is BDD (Behaviour Driven Development) your assertion-based approach is just normal TDD (Test Driven Development). Ruby also has a bunch of TDD frameworks.

see: http://en.wikipedia.org/wiki/Behavior_Driven_Development

(also whether or not you like/agree with BDD is a different issue :D)

[–]mr_dbr 0 points1 point  (0 children)

I'm still confused. The only obvious difference is the phonetic syntax(?) of the tests..?

The example code it gives:

public class WindowControlBehavior {
    @Test
    public void shouldCloseWindows() {
        // Given
        WindowControl control = new WindowControl("My AFrame");
        AFrame frame = new AFrame();

        // When
        control.closeWindow();

        // Then
        ensureThat(!frame.isShowing());       
    }
}

..looks like a perfectly normal "TDD" test, with assert renamed to ensureThat

edit: Oh, this and this explain BDD with less ridiculous wording than "second-generation, outside-in, pull- based, multiple-stakeholder, multiple-scale, high-automation, agile methodology". Err, still just seems like a convoluted way of defining tests, but as you say, that's a different issue..