[rspec-users] Rspec Caveman questions.

sudara sudara at modernthings.net
Wed Sep 5 15:49:18 EDT 2007


I'm just a caveman with some caveman questions.

I've been parsing Rspec for quite a while, and I'm writing my first series
of specs. My initial impressions are "Verbose, but understandable. Helpful
and intuitive, but so much to digest." I want to congratulate the folks who
are dedicating a chunk of their lives to writing this, and ask 2 caveman

My first is "Why lambda in rpsec"? It doesn't strike me as "reads like
english" or "easily understandable." I understand it's place in ruby (um,
kind of :), but my thinking is:

lambda { do_something_risky }.should raise_error

would be more understandable (and fun!) written as:

running { something_risky }.should raise_error

My second question is: For those folks who are getting up to speed with ruby
and rails AND digesting rspec along the way, there is a lot of incoming DSL.
As I started with rails before rspec, I found myself using script/console to
check my code, poking at different ways of expressing myself with ruby.

Is there a way to "poke at my specs"? I can load up my test environment, but
can I spec things "live" so that I can find out what works and what doesn't?
I find I'm wasting a chunk of time (as I don't have the DSL even 60% down)
writing specs and getting it wrong. Am I missing a trick, or I.should_have

um, thanks for any potential caveman responses - the more caveman
(pragmatic) the better.

View this message in context: http://www.nabble.com/Rspec-Caveman-questions.-tf4387721.html#a12509678
Sent from the rspec-users mailing list archive at Nabble.com.

More information about the rspec-users mailing list