David Chelimsky
2009-Mar-13 13:24 UTC
[rspec-users] [Proposal] deprecate context() at the top level
Hi all, There are two tickets in lighthouse that point to problems with the use of context() in RSpec: * conflict with JRuby: http://rspec.lighthouseapp.com/projects/5645/tickets/728 * request context() be deprecated http://rspec.lighthouseapp.com/projects/5645/tickets/713 As there are a lot of people (and libraries) that mix and match describe() and context(), I don''t plan to simply remove it. However, a couple of suggestions have come up that I''m considering. Here''s the proposal. == deprecate and eventually remove context() ONLY AT THE TOP LEVEL In my personal use, and from what I''ve seen in other libraries that are driven with RSpec, this is the common use of context(): describe "Something" do context "in some context" do You would *still be able to do that*, but you would *not be able to do this*: context "Something" do context "in some context" do = I''d like to know if you think removing context a the top level will create conflicts with your code or libraries you use. Please comment in http://rspec.lighthouseapp.com/projects/5645/tickets/713 instead of here - I''d like to keep the conversation in one place, if possible. Thanks for playing, David