http://seancorfield.github.io for newer blog posts." />

An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

cfSpec and Railo / OpenBD

February 4, 2009 · 2 Comments

I'm working on a specification suite with Pat Santora, who recently joined the Edmund Event-Driven Model project as a contributor (more on that shortly), and we're using cfSpec to define the expected behavior of Edmund.Yes, I know, a little bit late in the game - Edmund was mostly written as an experiment so I didn't write test cases for it. Now it's evolved into a useful micro-framework, it needs test cases, OK? Back to the plot... cfSpec runs nicely on ColdFusion 8. It uses <cfimport> with an empty prefix= attribute to allow "natural language" style tags - a domain-specific language - for the specifications. Unfortunately, neither Railo nor Open BlueDragon does not support an empty prefix. I've raised the issue on both the Railo and OpenBD mailing lists. Update: Railo 3.1 supports the empty prefix now and runs cfSpec pretty well! If you want to run cfSpec on OpenBD those two engines in the mean time, you'll need to write your specifications with a prefix, such as:
<cfimport taglib="/cfspec" prefix="bdd"/>
<bdd:describe hint="scenario">
<bdd:it should="be some behavior">
...
</bdd:it>
</bdd:describe>
As you can see, this is not as clean and easy to read as what works on CF8:
<cfimport taglib="/cfspec" prefix=""/>
<describe hint="scenario">
<it should="be some behavior">
...
</it>
</describe>

Tags: coldfusion · edmund · openbd · railo · tdd

2 responses so far ↓

  • 1 Andrea // Feb 4, 2009 at 3:25 AM

    Hi Sean,

    edmund looks very very interesting approach.

    Are you going to support it ??
  • 2 Sean Corfield // Feb 4, 2009 at 12:15 PM

    @Andrea, absolutely. Edmund is being used by a couple of companies in production code now and it is in active development. As the spec effort expands, documentation will follow, as well as new features requested by users. There's been a Google group for a while.

Leave a Comment

Leave this field empty