home icon contact icon rss icon

rspecs

I just watched the peepcode #18 talking about rspecs’ stories, and I must say I am surprised. I wasn’t really expecting that much of this feature. Specially because I know how useful that would be for someone like me (I have focus issues). But, even for really large and boring projects, it’s like staying on track on rails haha (ok, I lol’d for a second, leave me alone).

For instance, take a look at this:


require 'rubygems'
require 'spec/story'
steps_for (:string_manipulation) do

  # Given the string PeepCode
  Given("the string $string") do |string|
    @string = string
  end

  # When the string is reversed
  When("the string is reversed") do
    @string.reverse!
  end

  # Then the result should be edocpeeP
  Then("the string should be $result") do |result|
    @string.should == result
  end
end

Isn’t that extremely cool? I liked it.

But it still feels weird to think of me making something like that before I start coding something.

It’s really annoying sometimes to start a project without any kind of organization like I did several times in the past, for several reasons, but it feels like such a hard evolution, like an embryo gaining multiple functionalities during weeks before it even takes shape. And getting fully ready months after that.

NIGHTMARE.

I think I lost too many brain cells to that, and to booze.