Scott Taylor wrote:
> Hi all,
> 
> Just wondering about this:  I've been dealing with classes/modules  
> nested in several layers of namespaces.  Here would be an example of  
> a describe block:
> 
> describe ClassOne::ClassTwo::ClassThree, "description here" do
> ...
> end
> 
> What would be the easiest way to write something a little more terse,  
> like:
> 
> describe ClassThree, "description here" do
> ...
> end
> 
> If this has come up before, just tell me to google.
> 
> Thanks for your time,
> 
> Scott Taylor

You can put the descriptions inside of modules. AFAICT, this has no 
effect on how anything functions, it just lets you drop the namespacing 
ugliness from your code:

module SomeProject
   class SomeClass
   end
end

module SomeProject

describe SomeClass, "something or other" do
end

end

Kyle
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to