[rspec-users] [rspec-devel] describe "RSpec's documentation" do

David Chelimsky dchelimsky at gmail.com
Sun Nov 8 07:39:02 EST 2009

On Sun, Nov 8, 2009 at 5:55 AM, Rodrigo Rosenfeld Rosas <
lbocseg at yahoo.com.br> wrote:

> David Chelimsky escreveu:
>> As for internals, my goal for the Cucumber features is to provide an
>> executable set of documentation for end users to understand how to use
>> RSpec. Not so much to expose internals, which I think is better addressed in
>> the RSpec code examples themselves. Make sense?
> Actually, I don't like very much the idea of hiding the internals.

I'm not saying hide them. I'm saying document them in a different way.

> I've spent too much time trying to figure out what happens in the internals
> so that I could integrate Rspec with Webrat and I still don't understand a
> lot of things.
> For instance, why can I use 'visit' when I am testing an expected behavior,
> but cannot use 'redirected_to' while both belongs to Webrat::Session?
> I think it helps a lot understanding what is happening on the internals.
> Some topics that could be approached on documentation:
> - What happens on a describe/context/it/specify call?
> - What is the load order when running tests? (talking more deeply about
> spec_helper.rb)
> - How are database transactions dealt with in Rspec and the differences
> between before(:all) and before(:each) with respect to databases.
> - What is the class (how is it created?) that we are writing code on? How
> are the expectations/matchers injected on classes and which classes?
> I really think that knowing the internals would help a lot and save us many
> many time.
> The syntax of Rspec should be simple so that reading the specs should be
> natural, but it doesn't mean that we should abstract from what is happening
> in the internals...

Separate, not abstract.

> Well, that is my opinion.

Thanks for sharing it. I think we can work towards this goal as well, but
I'd like to push this one further back as plan to make significant changes
to internals in the next major version of rspec. We'll roll that out
gradually (with alpha, beta, and candidate releases), but any time spent on
a big document-the-internals effort before then would be a waste.


> Regards,
> Rodrigo.
> __________________________________________________
> Faça ligações para outros computadores com o novo Yahoo! Messenger
> http://br.beta.messenger.yahoo.com/
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20091108/50dddf16/attachment.html>

More information about the rspec-users mailing list