Question. Currently rspec appears to allow for a two-step test system, like context "abc" it ''should do y'' do end end It might be convenient to have an arbitrary number of nests, like context "abc" it ''should do y'' do it ''should also be able to do x'' end end end Thoughts? -r
On Tue, Jan 12, 2010 at 4:40 PM, rogerdpack <rogerpack2005 at gmail.com> wrote:> Question. > Currently rspec appears to allow for a two-step test system, like > > context "abc" > it ''should do y'' do > end > end > > It might be convenient to have an arbitrary number of nests, like > > context "abc" > it ''should do y'' do > > it ''should also be able to do x'' > end > > end > end > > Thoughts? > -r >Why would that be more convenient? Can you give a more concrete example (with some sample code)? David -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20100112/2f0cdeb5/attachment.html>
On 12 Jan 2010, at 22:40, rogerdpack wrote:> Question. > Currently rspec appears to allow for a two-step test system, like > > context "abc" > it ''should do y'' do > end > end > > It might be convenient to have an arbitrary number of nests, like > > context "abc" > it ''should do y'' do > > it ''should also be able to do x'' > end > > endYou do realise you can already nest contexts don''t you? That makes much more sense to me than what you''ve suggested.> end > > Thoughts? > -r > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-userscheers, Matt http://mattwynne.net +447974 430184
> > You do realise you can already nest contexts don''t you? That makes ? > much more sense to me than what you''ve suggested. >Hi Roger, Here''s an example of nesting contexts that Matt is talking about: http://gist.github.com/275798 Peace, Phillip