On Dec 4, 2011, at 9:39 PM, Gordon Yeong wrote:

> Makes sense. From your explanation and examples,
> 
> 1) when include is being used, helper methods of a module can ALSO be 
> accessed by the example groups. Hence, 
> 
>  class Baz
>    include Helper
>  end
> 
>  Baz.help # => :available
>  Baz.new.help # => :avalable

Nope. Only the examples (instances) e.g. Baz.new.help.

> 2) when exclude is being used, it's only limited to only 1 'level' of the 
> extension (ie. either the class or the instantiation of the class (object)). 

extend, not exclude.

No - extend adds methods of the module to the example group - never the 
example. Since nested example groups are subclasses of their parents, they are 
also available in nested groups, but not in any examples.

> Am I right?

Guess not :)

You can prove this all out by trying different combos yourself and seeing 
what's available when/where.

Cheers,
David

-- 
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