David, you're quite right.

I found the following definition for both in
http://marakana.com/bookshelf/ruby_tutorial/modules.html very helpful.

   - include <http://ruby-doc.org/core-1.9.3/Module.html#M001042> - mixes
   in a module into the class' objects (instantiations)
   - extend <http://ruby-doc.org/core-1.9.3/Object.html#M001404> - mixes in
   a module's into self and the module's methods are available as class methods

Looked up
https://www.relishapp.com/rspec/rspec-core/docs/helper-methods/define-helper-methods-in-a-module
.

I have also posted the question which ultimately leads to finding out the
differences between include and extend in the rspec google
group.<https://groups.google.com/group/rspec/browse_thread/thread/a33132c92c7b92d0>

I wrote a few test scripts to learn about this more.

I have updated my little blog to document what I have learnt today
http://rubyexplorer.blogspot.com/2011/12/include-versus-extend-i-found-following.html

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rspec?hl=en.

Reply via email to