[Rspec-users] RSpec style in Scriptaculous' unittest.js
aslak.hellesoy at gmail.com
Mon Sep 4 10:34:13 EDT 2006
On 9/4/06, Jason Anderson <thenewjhp at gmail.com> wrote:
> I can't help noticing a bit of code that I keep repeating.
When starting a new topic, please don't reply to an existing mail.
> I find myself writing things like:
> specify "should be empty" do
> Instead, suppose rspec captured and stored the result of setup() and
> used that value automatically if specify() is called without a block?
> Here's how it might look, using the example from the rspec page:
> context "BDD framework" do
> setup do
> BddFramework.new # value stored by rspec
> specify "should be adopted quickly"
> specify "should be intuitive"
> Lovely, no?
Interesting approach to getting rid of duplication!
Please submit a feature request at Rubyforge. Or better - a patch.
> Jason Anderson
> thenewjhp at gmail.com
> Rspec-users mailing list
> Rspec-users at rubyforge.org
More information about the Rspec-users