Caboosers drop RSpec

On Nov 4, 5:25 am, “aslak hellesoy” [email protected] wrote:

post.

Well, I didn’t think we were whining. I’ve been using rSpec since the
early days, have contributed code and bug reports back (our team has
built plugins around rspec too). We have more than 30 active projects
in production built with rSpec… tens (hundreds?) of thousands of
lines of test code… it’s been the best choice for us, so far, and
obviously I’m not planning on throwing that out. It’s really not a
case of “waah, waah, rspec sucks”, even if you want to hear it that
way.

However, in my opinion the upgrade path should not be difficult, and
the ability to have development tools (rspec) not checked into the
code base for production deployment (config.gems in test.rb) is
important to me. So when we upgraded and versions started leaking
between apps and specs start failing mysteriously for some developers
and not others, we started casting about for something simpler and/or
better. I don’t want to be fighting my tools, I want them to be
working with me… I don’t want to start getting weird failures from an
upgrade. It might well be bugs in Rails not rSpec, but if the only
thing that changed was rSpec, well, you see my problem. In my mind
rspec has a long history of breaking things between versions.

My blog post was an honest attempt at finding out what the wider
community is using – why, how – for their testing needs. I’m not
going to find that on the rspec-users mailing list. And, yes, it is
obvious that many of the commenters don’t understand how to use rSpec.

Courtenay

On Tue, Nov 4, 2008 at 1:47 PM, Mike G. [email protected]
wrote:

Actually I didn’t know about it, sometimes lot of that stuff get lost
between links.

We are all still confused with RSpec, is hard when you need to jump
from Test::Unit, NUnit and other testing frameworks back and forth (at
least for me).

What about something like the merb book? I know David cannot
participate on it, but others can and we should bring the basic and
advance techniques from blog posts and the mailing list to that
document.


Luis L.
AREA 17

Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams

Fernando P. [email protected] writes:

That doesn’t really motivate people to share their experiences with
RSpec, and when they do, rspec supporters treat them as “whiners”.

hrm…I’m not going to argue with your experience, but I will say that
mine has shown the complete opposite. The RSpec list is a damn good one
in my opinion, thanks to people like David, Aslak, Ben, Scott, Ashley,
Matt, Joseph…and those are just a few off the top of my head. We’ve
got a good little community here, and I’m proud to be a part of it.
It’s unfortunate that others have a less enjoyable experience than I
have - what can we do to fix that?

As far as the linked article goes, well, we’re all trying to create
great software. If something is keeping you from doing that, you either
fix it or look somewhere else. And it’s important to recognize that
either choice is okay - we all have limited amounts of time and energy.

Pat

“Stephen E.” [email protected] writes:

The list is pretty helpful, sure, but the
documentation could stand for a lot of improvement.

Agree 100%. Got a git repo I can pull from? :slight_smile:

Pat

On 4 Nov 2008, at 17:32, court3nay wrote:

upgrade. It might well be bugs in Rails not rSpec, but if the only
thing that changed was rSpec, well, you see my problem. In my mind
rspec has a long history of breaking things between versions.

If this is a common complaint, do we maybe need some better
acceptance tests for rspec - some cucumber scripts which cover use
cases like upgrades? How possible would that be to achieve?

cheers,
Matt

As a starter, can someone tell me if the specs defined in
restful_authentication are clever? Can I learn from them?

Because right now I find them overwhelming, complicated, over-testing,
etc.

Does anyone know of a good app with specs I could learn from? It always
makes me laugh to think about all the good things people say about TDD,
and if I take for instance Spree (a Ror ecommerce website), well the
specs are almost not defined at all, whereas the code is present.

Fernando P. wrote:

As a starter, can someone tell me if the specs defined in
restful_authentication are clever? Can I learn from them?

Please don’t look at restful_auth as an example on how to use rspec
examples and/or the story runner. The stories in particular are very
brittle.

Because right now I find them overwhelming, complicated, over-testing,
etc.

Yeah, they go a little overboard with keeping the specs DRY which
results IMO hard to follow specs. They also test private methods
directly and some other things which are TDD smells.

Does anyone know of a good app with specs I could learn from? It always
makes me laugh to think about all the good things people say about TDD,
and if I take for instance Spree (a Ror ecommerce website), well the
specs are almost not defined at all, whereas the code is present.

Hmm… I’ve heard good things about Radiant (the CMS) but I haven’t
looked too closely myself. Also, the rspec code base itself is a very
good place to learn from. I think there are plenty of open-source tools
that use rspec that you can learn from but I can’t seem to think of many
open-source rails apps with stellar examples.

I have been thinking for a while that a worthwhile project would be to
fork restful_auth and add some clearer code examples (specs) and
Cucumber features. Since so many rails developers start out with
restful auth it would be a good way to illustrate some good rspec
guidelines. Alas, I have been think this for a while but have done
nothing… It has been one of those things on my endless OSS TODO lists.

-Ben

On Nov 4, 2008, at 3:01 PM, Ben M. wrote:

Hmm… I’ve heard good things about Radiant (the CMS) but I haven’t
looked too closely myself.

Don’t look too closely. There’s lots of coverage, but the tests were
converted from Test::Unit, so it wasn’t done in traditional BDD, but
we’re moving to clear up the behavior descriptions which are
lackluster. They’ll be getting better.
I have a branch where I’m trying to clear this up, but I’ve not worked
on it in weeks (and it lags behind edge as a result)

Perhaps this’ll be the impetus to get it going again.

Thank you Ben, my doubts about restful_auth specs have been confirmed.

I think having a good solid Rails app, with well written specs to learn
from is what prevents its adoption. I myself have got pissed a thousand
times not knowing how to write a spec for a very simple piece of code.
So I simply write code and don’t care about testing it as I don’t know
how to test it.

I would have one piece of advice to give: please remove rcov. This thing
entices people to write shit loads of useless specs. 100% code coverage
of poorly written specs doesn’t prevent bugs nor does it guaranty secure
code, so please trash it.

I would like to know: does anyone in this mailing-list actually never
ever writes a single line of code before having written its spec(s)? In
other words: do you fully comply to TDD or do you sometimes break the
rules?

Fernando P. [email protected] writes:

As a starter, can someone tell me if the specs defined in
restful_authentication are clever? Can I learn from them?

Because right now I find them overwhelming, complicated, over-testing,
etc.

I don’t even use restful_auth, precisely because I thought the specs
sucked. I remember checking it out, running the specs and stories and
there were like 400 specs and 60 stories or something. It was like wtf
isn’t this thing just doing authentication?

I’ve been working on giternal [1] a bit lately, which has specs and
cucumber features. It’s not the greatest thing in the world, but it’s a
lot more accessible than restful_auth I think. It’s also been pretty
interesting to me, sometimes if I’m having trouble writing a story, I
try a lower-level example and it’s trivial, and vice-versa.

Pat

Pat M. wrote:

I don’t even use restful_auth, precisely because I thought the specs
Pat


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

I believe Pat meant to add this reference at the bottom of his email: :slight_smile:

[1] http://github.com/pat-maddox/giternal/tree/master

On 4 Nov 2008, at 21:05, Fernando P. wrote:

I would like to know: does anyone in this mailing-list actually never
ever writes a single line of code before having written its spec(s)?
In
other words: do you fully comply to TDD or do you sometimes break the
rules?

As a friend of mine said recently, “you have to be dogmatic for a
while to learn when it’s OK to be pragmatic”. But that’s just his
opinion:
http://www.nabble.com/Working-outside-in-with-Cucumber-and-RSpec-td20162633.html

Ben M. [email protected] writes:


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

See what a great community we have!!

On Nov 5, 1:55 am, “Luis L.” [email protected] wrote:

Given a problem I have with RSpec
And I post to the mailing list
When noone answer my post
And has been N days since I posted
Then I start whining in my blog about it

I’m still learning the ways of cucumber, though I think this could/
should be:

Given a problem I have with RSpec
When I post to the RSpec mailing list
And noone answers my post after 10 days
Then I start whining in my blog about RSpec

:stuck_out_tongue:

On Nov 04, 2008, at 11:09 pm, Dr Nic wrote:

Given a problem I have with RSpec
When I post to the RSpec mailing list
And noone answers my post after 10 days
Then I start whining in my blog about RSpec

Meh, you are both amateurs at whine-driven development. Please observe:

Given a problem I have with RSpec
When I post to the RSpec mailing list
And noone answers my post after 10 days
Then I start whining in my blog about RSpec

More Examples:
| days since post | whining medium |
| 0.1 | Twitter |
| 0.2 | Facebook |
| 2 | Ruby Flow |
| 5 | Ruby Forum |
| 20 | Slashdot |
| 50 | YouTube |

To think of Aslak’s hard work going to waste…

(Bonus points for anyone who noticed that “YouTube” should be in the
“slow-running” feature set and that “Slashdot” must be run with
grammar checking disabled.)


http://www.patchspace.co.uk/

Did this person the mailing list first?

On Wed, Nov 5, 2008 at 1:01 AM, Ashley M.
[email protected] wrote:

| 5 | Ruby Forum |
| 20 | Slashdot |
| 50 | YouTube |

To think of Aslak’s hard work going to waste…

Hahaha. That made me laugh out loud.

On Tue, Nov 4, 2008 at 8:09 PM, Dr Nic [email protected] wrote:

Given a problem I have with RSpec
When I post to the RSpec mailing list
And noone answers my post after 10 days
Then I start whining in my blog about RSpec

:stuck_out_tongue:

Oh, let’s put RSpec between quotes, so we can reuse the steps to whine
about other projects too.

Given a problem I have with ‘Rails’
When I post to the ‘Rails’ mailing list
And noone answe my post after 2 days
Then I start whining in my blog about ‘Rails’

:wink:

Thanks Dr. Nic, your Scenarios from newgem inspired me to draw the
lines for rake-compiler gem :wink:

Regards

Luis L.
AREA 17

Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams

On 05/11/2008, at 01:37 , Steven B. wrote:

Big difference between “haven’t been able to” and “wouldn’t learn
the tools”. Ashley’s post below sums it up best. This is a problem
that’s seen regularly when working with new ideas. How many times
have you seen Agile blamed when a project fails due to poor
management? I personally see this all the time.

Personally, the first question on my mind was why they weren’t using
separate environments for each of their production applications.

I’m learning Django at the moment, which is kinda like a Python-on-
Rails wannabe. The most useful tool I’ve come across recently has been
“virtualenv” which basically takes your system-installed environment,
copies it (including the specific version of the Python interpreter)
into a stand-alone environment, then sets the path for Python
libraries appropriately. Then when you go messing with the environment
(adding new third-party software) it only affects that specific
virtual environment.

A similar thing in the Mac OS X world of Ruby on Rails programming is
Locomotive. I love Locomotive.

I can’t understand why people who are serious about production
environment stability would install multiple applications in the same
environment. It’s not healthy.

Alex

I’m learning Django at the moment, which is kinda like a Python-on-
Rails wannabe.

Just to clear things out. Django is absolutely not a Python-on-Rails
wannabe. See Rubies and Snakes conference for disambiguation.