November 24, 2006 @ 02:52 AM

test/spec kicks simply_bdd's ass

Christian Neukirchen’s test/spec is a worthy replacement of simply_bdd. Its context/specify methods work almost exactly the same way, and Chris has gone to the trouble of converting the test/unit assert_* methods to should.* methods.

I’ve started a little test/spec on rails plugin for implementing some rails-specific should extensions. It’s very sparse right now, so patches are very welcome.

One other little experiment I added was specifying the chained should methods as a string:


# OLD
5.should.not.be.nil
5.should.not.equal 6

# NEW
5.should "not be nil" 
5.should "not equal", 6

I don’t know if I like that yet. But, I’m also not crazy about all the periods either.

Comments are closed.