[rspec-users] Best way to spec nested modules?

Stuart Hungerford stuart.hungerford at anu.edu.au
Mon Jan 26 15:59:19 EST 2009

On 27/01/2009, at 4:06 AM, rspec-users-request at rubyforge.org wrote:

> Put the describe in the module, and take advantage of Ruby's lookup  
> semantics:
> module Foo
>  module Baz
>    describe Class1 do
> ...

    Thanks for that beautifully simple suggestion!  Thanks also to  
Nick Hoffman
    for the reminder about mocks and stubs.  The overly concise  
variable names
    I used in my example are for example purposes only, the real ones  
are more
    readable and subject-specific.



Stuart Hungerford
ANU Supercomputer Facility

More information about the rspec-users mailing list